﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.calendar-page {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    height: calc(100vh - 90px);
    padding: 20px;
    background: #f8f9fa;
    overflow: hidden;
}

.calendar-sidebar {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 20px;
    min-height: 0;
}

.calendar-content {
    display: grid;
    grid-template-rows: 70px 1fr;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: auto;
    min-height: 0;
    min-width: 0;
}

/* mini takvim */
.mini-calendar {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
}

/* etkinlik listesi */
.event-list {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
}

    .event-list h5 {
        margin-bottom: 15px;
        font-weight: 600;
    }

/* büyük takvim */
.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
}

.calendar-nav-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s ease;
}

    .calendar-nav-btn:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
    }

#btnPrevMonth {
    margin-right: 8px;
}

#btnNextMonth {
    margin-left: 8px;
}

.calendar-more {
    font-size: 12px;
    color: #1a73e8;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

    .calendar-more:hover {
        background: #eef4ff;
    }

/* bugün butonu */
#btnToday {
    height: 38px;
    padding: 0 18px;
    border: 1px solid #dadce0;
    border-radius: 20px;
    background: #fff;
    color: #3c4043;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}

    #btnToday:hover {
        background: #f8f9fa;
        border-color: #c6c6c6;
    }

    #btnToday:active {
        transform: scale(.97);
    }

#currentMonth {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    min-width: 220px;
}

#calendar {
    width: 100%;
    height: 100%;
}

/* Takvim Izgarası Elemanları */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #ececec;
}

.weekday {
    text-align: center;
    padding: 15px;
    font-weight: 600;
    background: white;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 130px); /* Masaüstü sabit yüksekliği */
}

.day {
    height: 130px;
    overflow: hidden;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    padding: 8px;
}

.other-month {
    color: #b5b5b5;
    background: #fafafa;
}

.current-month {
    color: #222;
}

.day-events {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 90px;
    overflow: hidden;
}

.calendar-event {
    background: #1a73e8;
    color: white;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* yaklaşan etkinlikler */
#upcomingEvents {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: .2s;
}

    .event-item:hover {
        background: #f8f9fa;
    }

.event-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.event-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.empty-events {
    text-align: center;
    color: #999;
    padding: 20px 0;
}

/* Renk Tanımlamaları */
.event-congress {
    background: #1a73e8;
}

.event-agenda {
    background: #34a853;
}

.event-event {
    background: #a142f4;
}

.event-online {
    background: #f29900;
}

.event-badge-congress {
    background: #1a73e8;
}

.event-badge-agenda {
    background: #34a853;
}

.event-badge-event {
    background: #a142f4;
}

.event-badge-online {
    background: #f29900;
}

.event-badge-default {
    background: #5f6368;
}

.event-type-badge {
    display: inline-block;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* mini takvim detayları */
.mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mini-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.mini-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.mini-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mini-day {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    aspect-ratio: 1;
}

.mini-event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1a73e8;
    margin-top: 2px;
}

.mini-day:hover {
    background: #ececec;
}

.mini-other-month {
    color: #bdbdbd;
}

/* pop up foto */
.event-image-container {
    width: 100%;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.event-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#shareModal .list-group-item,
#calendarModal .list-group-item {
    border: none;
    padding: 14px 18px;
    font-size: 16px;
    transition: .2s;
}

    #shareModal .list-group-item:hover,
    #calendarModal .list-group-item:hover {
        background: #f1f3f4;
        cursor: pointer;
    }

/* Etkileşimler & Durumlar */
.day, .mini-day {
    position: relative;
    transition: background-color .20s ease, border-color .20s ease, box-shadow .20s ease;
}

    .day:hover:not(.selected),
    .mini-day:hover:not(.selected) {
        background: #eef4ff;
    }

    .day.today::after {
        content: "";
        position: absolute;
        inset: 2px;
        border: 2px solid #74c0fc;
        border-radius: 8px;
        pointer-events: none;
    }

    .mini-day.today::after {
        content: "";
        position: absolute;
        inset: 1px;
        border: 2px solid #74c0fc;
        border-radius: 50%;
        pointer-events: none;
    }

    .day.selected {
        background-color: rgba(26, 115, 232, 0.08);
    }

    .mini-day.selected {
        background-color: rgba(26, 115, 232, 0.12);
    }

    .day.today.selected {
        background-color: rgba(26, 115, 232, 0.08);
    }

    .mini-day.today.selected {
        background-color: rgba(26, 115, 232, 0.12);
    }

.calendar-content {
    position: relative;
}

.month-picker-panel {
    position: fixed;
    width: 260px;
    display: none;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    z-index: 3000;
}

    .month-picker-panel.show {
        display: block;
    }

.day-event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
    margin-bottom: 8px;
}

    .day-event-item:hover {
        background: #f5f7fa;
    }

.day-event-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.day-event-title {
    font-weight: 600;
    color: #202124;
}

.day-event-time {
    font-size: 12px;
    color: #666;
}

/* ==========================================================================
   YENİLENMİŞ MOBİL RESPONSIVE ALANI (Ekrana Tam Sığdırma Modu)
   ========================================================================== */

@media (max-width: 992px) {
    .calendar-page {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
        gap: 16px;
        padding: 16px;
    }

    .calendar-sidebar {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .calendar-content {
        grid-template-rows: auto 1fr;
        overflow: hidden;
    }

    .calendar-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 12px 16px;
    }

    #currentMonth {
        order: -1;
        width: 100%;
        min-width: auto;
        text-align: center;
        font-size: 22px;
    }

    #btnToday {
        order: 1;
    }

    /* Sabit genişlikleri kaldırıp ekrana yayıyoruz */
    .calendar-weekdays,
    .calendar-days {
        min-width: 100% !important;
        width: 100%;
    }

    .calendar-days {
        grid-template-rows: repeat(6, auto); /* Mobilde dikey yükseklik esnek olsun */
    }

    .weekday {
        padding: 10px 2px;
        font-size: 13px;
    }

    .day {
        height: auto;
        min-height: 85px; /* Hücreler aşırı küçülmesin */
        padding: 4px;
    }

    .event-list {
        max-height: 350px;
        overflow-y: auto;
    }

    .event-image-container {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .calendar-page {
        padding: 10px;
        gap: 12px;
    }

    #currentMonth {
        font-size: 20px;
    }

    .calendar-nav-btn,
    #btnToday {
        height: 36px;
    }

    .mini-calendar,
    .event-list {
        padding: 14px;
    }

    .weekday {
        font-size: 12px;
    }

    .day {
        min-height: 75px;
        padding: 4px 2px;
    }

    .calendar-event {
        font-size: 10px;
        padding: 2px 4px;
    }

    .event-image-container {
        height: 180px;
    }

    .event-title {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .calendar-page {
        padding: 8px;
    }

    #currentMonth {
        font-size: 18px;
    }

    .weekday {
        font-size: 11px;
    }

    .day {
        min-height: 65px;
    }

    .mini-calendar,
    .event-list {
        border-radius: 10px;
    }

    .event-image-container {
        height: 160px;
    }
}



/*dropdown calendar*/
.calendar-title-picker,
.mini-title-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .calendar-title-picker select {
        width: auto;
        min-width: 130px;
    }

        .calendar-title-picker select:last-child {
            min-width: 90px;
        }

    .mini-title-picker select {
        font-size: 14px;
    }