/* =====================================================
   TAKVİM SAYFASI
===================================================== */

.calendar-page {
    width: 100%;
}


/* =====================================================
   ÜST ALAN
===================================================== */

.calendar-toolbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}


.calendar-toolbar h1 {
    margin: 0 0 4px;

    font-size: calc(27px * var(--text-scale, 1));
}


.calendar-toolbar p {
    margin: 0;

    color: #777;

    font-size: calc(13px * var(--text-scale, 1));
}


/* =====================================================
   TAKVİM ANA YAPI
===================================================== */

.calendar-shell {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        310px;

    gap: 16px;

    align-items: start;
}


.calendar-main {
    min-width: 0;

    background: white;

    border: 1px solid #e8e8e8;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, 0.025);
}


/* =====================================================
   TAKVİM NAVİGASYONU
===================================================== */

.calendar-navigation {
    display: grid;

    grid-template-columns:
        38px
        auto
        1fr
        38px;

    align-items: center;

    gap: 8px;

    padding: 15px;

    border-bottom:
        1px solid #eeeeee;
}


.calendar-navigation h2 {
    margin: 0;

    text-align: center;

    text-transform: capitalize;

    font-size: calc(18px * var(--text-scale, 1));
}


.calendar-nav-button {
    width: 38px;
    height: 38px;

    border: 1px solid #e2e2e2;

    border-radius: 10px;

    background: white;

    color: #333;

    font-size: calc(24px * var(--text-scale, 1));

    line-height: 1;

    cursor: pointer;
}


.calendar-nav-button:hover {
    background: #f7f7f7;
}


.calendar-today-button {
    border: 1px solid #dedede;

    border-radius: 9px;

    background: white;

    padding: 8px 11px;

    font-size: calc(11px * var(--text-scale, 1));

    font-weight: 700;

    cursor: pointer;
}


/* =====================================================
   HAFTA GÜNLERİ
===================================================== */

.calendar-weekdays {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    background: #fafafa;

    border-bottom:
        1px solid #eeeeee;
}


.calendar-weekdays span {
    padding: 9px 5px;

    text-align: center;

    color: #888;

    font-size: calc(10px * var(--text-scale, 1));

    font-weight: 700;
}


/* =====================================================
   TAKVİM GRID
===================================================== */

.calendar-grid {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);
}


.calendar-day {
    position: relative;

    min-width: 0;

    min-height: 105px;

    padding: 8px;

    text-align: left;

    border: none;

    border-right:
        1px solid #eeeeee;

    border-bottom:
        1px solid #eeeeee;

    background: white;

    color: #333;

    overflow: hidden;

    cursor: pointer;
}


.calendar-day:hover {
    background: #fffafa;
}


.calendar-day.other-month {
    background: #fafafa;

    opacity: 0.48;
}


.calendar-day.selected {
    box-shadow:
        inset 0 0 0 2px
        #cf0000;

    z-index: 1;
}


.calendar-day-number {
    width: 25px;
    height: 25px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: calc(11px * var(--text-scale, 1));

    font-weight: 700;
}


.calendar-day.today
.calendar-day-number {
    background: #c70000;

    color: white;
}


/* =====================================================
   GÜNDEKİ KAYIT ÖNİZLEMELERİ
===================================================== */

.calendar-day-events {
    display: flex;

    flex-direction: column;

    gap: 3px;

    margin-top: 5px;
}


.calendar-event-preview {
    min-width: 0;

    display: flex;

    align-items: center;

    gap: 5px;

    padding: 4px 5px;

    border-radius: 6px;

    font-size: calc(8px * var(--text-scale, 1));

    white-space: nowrap;

    overflow: hidden;
}


.calendar-event-preview > span:last-child {
    overflow: hidden;

    text-overflow: ellipsis;
}


.calendar-event-dot {
    width: 5px;
    height: 5px;

    min-width: 5px;

    border-radius: 50%;

    background: currentColor;
}


/* HATIRLATICI */

.calendar-event-reminder {
    background: #fff0f0;

    color: #9c0000;
}


/* GÖREV */

.calendar-event-task {
    background: #edf5ff;

    color: #315c94;
}


/* NOT */

.calendar-event-note {
    background: #fff7d7;

    color: #8a6500;
}


.calendar-more {
    padding: 2px 5px;

    color: #777;

    font-size: calc(8px * var(--text-scale, 1));

    font-weight: 700;
}


/* =====================================================
   SAĞ GÜN PANELİ
===================================================== */

.calendar-day-panel {
    position: sticky;

    top: 18px;

    background: white;

    border: 1px solid #e8e8e8;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, 0.025);
}


.calendar-day-panel-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    padding: 16px;

    border-bottom:
        1px solid #eeeeee;
}


.calendar-day-panel-header span {
    display: block;

    margin-bottom: 3px;

    color: #999;

    font-size: calc(9px * var(--text-scale, 1));
}


.calendar-day-panel-header h3 {
    margin: 0;

    font-size: calc(14px * var(--text-scale, 1));

    text-transform: capitalize;
}


.calendar-small-add {
    width: 34px;
    height: 34px;

    min-width: 34px;

    border: none;

    border-radius: 10px;

    background: #c70000;

    color: white;

    font-size: calc(20px * var(--text-scale, 1));

    cursor: pointer;
}


.calendar-day-items {
    max-height: 670px;

    overflow-y: auto;

    padding: 10px;
}


/* =====================================================
   GÜN DETAY KAYDI
===================================================== */

.calendar-detail-item {
    display: grid;

    grid-template-columns:
        46px
        1fr;

    gap: 9px;

    padding: 11px 5px;

    border-bottom:
        1px solid #eeeeee;
}


.calendar-detail-item:last-child {
    border-bottom: none;
}


.calendar-detail-time {
    padding-top: 2px;

    color: #b00000;

    font-size: calc(10px * var(--text-scale, 1));

    font-weight: 800;
}


.calendar-detail-body {
    min-width: 0;
}


.calendar-detail-type {
    margin-bottom: 4px;

    color: #999;

    font-size: calc(8px * var(--text-scale, 1));

    font-weight: 700;

    text-transform: uppercase;
}


.calendar-detail-body > strong {
    display: block;

    font-size: calc(12px * var(--text-scale, 1));

    line-height: 1.35;
}


.calendar-detail-body p {
    margin: 5px 0 0;

    color: #777;

    font-size: calc(10px * var(--text-scale, 1));

    line-height: 1.45;
}


/* =====================================================
   ETİKETLER
===================================================== */

.calendar-detail-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 4px;

    margin-top: 7px;
}


.calendar-detail-tags span {
    padding: 4px 6px;

    border-radius: 6px;

    background: #f2f2f3;

    color: #666;

    font-size: calc(8px * var(--text-scale, 1));

    font-weight: 700;
}


/* =====================================================
   GÖREV
===================================================== */

.calendar-detail-task
.calendar-detail-time {
    color: #315c94;
}


/* =====================================================
   NOT
===================================================== */

.calendar-detail-note
.calendar-detail-time {
    color: #927000;

    font-size: calc(14px * var(--text-scale, 1));
}


/* =====================================================
   HATIRLATICI
===================================================== */

.calendar-detail-reminder
.calendar-detail-time {
    color: #b00000;
}


/* =====================================================
   OLUŞTURAN
===================================================== */

.calendar-created-by {
    display: flex;
    flex-direction: column;

    gap: 3px;

    margin-top: 9px;

    padding-top: 8px;

    border-top: 1px dashed #e7e7e7;

    color: #999;

    font-size: calc(9px * var(--text-scale, 1));
}


.calendar-created-by > div {
    line-height: 1.4;
}


.calendar-created-by strong {
    color: #555;

    font-weight: 700;
}

/* =====================================================
   DÜZENLE / SİL
===================================================== */

.calendar-item-actions {
    display: flex;

    gap: 5px;

    margin-top: 9px;
}


.calendar-item-actions button {
    border: none;

    border-radius: 6px;

    padding: 6px 8px;

    background: #eeeeef;

    color: #555;

    font-size: calc(8px * var(--text-scale, 1));

    font-weight: 700;

    cursor: pointer;
}


.calendar-item-actions button.danger {
    background: #fff0f0;

    color: #b00000;
}


/* =====================================================
   BOŞ GÜN
===================================================== */

.calendar-no-events {
    padding: 35px 15px;

    text-align: center;
}


.calendar-no-events strong {
    display: block;

    margin-bottom: 5px;

    font-size: calc(12px * var(--text-scale, 1));
}


.calendar-no-events span {
    color: #999;

    font-size: calc(10px * var(--text-scale, 1));
}


.calendar-loading {
    padding: 30px;

    text-align: center;

    color: #999;

    font-size: calc(11px * var(--text-scale, 1));
}


/* =====================================================
   HATIRLATICI / NOT SEÇİCİ
===================================================== */

.calendar-item-type {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;

    margin-bottom: 18px;
}


.calendar-type-button {
    border:
        1px solid #dddddd;

    border-radius:
        10px;

    padding:
        12px;

    background:
        white;

    color:
        #666;

    font-size: calc(11px * var(--text-scale, 1));

    font-weight:
        700;

    cursor:
        pointer;
}


.calendar-type-button:hover {
    border-color:
        #c9c9c9;
}


.calendar-type-button.active {
    border-color:
        #c50000;

    background:
        #fff3f3;

    color:
        #b00000;
}


/* =====================================================
   PERİYODİK
===================================================== */

.reminder-repeat-toggle {
    margin: 4px 0 17px;
}


.reminder-repeat-toggle label {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: calc(12px * var(--text-scale, 1));

    font-weight: 700;

    cursor: pointer;
}


.reminder-repeat-toggle input {
    width: 17px;
    height: 17px;

    accent-color: #c50000;
}


.reminder-repeat-options {
    padding: 13px;

    margin-bottom: 15px;

    border: 1px solid #eeeeee;

    border-radius: 11px;

    background: #fafafa;
}


/* =====================================================
   EKİP SEÇİMİ
===================================================== */

.reminder-team-list {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 7px;
}


.reminder-team-option {
    display: flex;

    align-items: center;

    gap: 7px;

    padding: 9px;

    border: 1px solid #e5e5e5;

    border-radius: 8px;

    background: white;

    font-size: calc(10px * var(--text-scale, 1));

    cursor: pointer;
}


.reminder-team-option:hover {
    border-color: #cccccc;
}


.reminder-team-option input {
    width: 15px;
    height: 15px;

    accent-color: #c50000;
}


/* =====================================================
   SCROLLBAR
===================================================== */

.calendar-day-items::-webkit-scrollbar {
    width: 4px;
}


.calendar-day-items::-webkit-scrollbar-thumb {
    background: #d5d5d5;

    border-radius: 20px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1050px) {

    .calendar-shell {
        grid-template-columns:
            1fr;
    }


    .calendar-day-panel {
        position: static;
    }


    .calendar-day-items {
        max-height: none;
    }

}


/* =====================================================
   TELEFON
===================================================== */

@media (max-width: 700px) {

    .calendar-toolbar {
        align-items:
            flex-start;
    }


    .calendar-toolbar h1 {
        font-size: calc(21px * var(--text-scale, 1));
    }


    .calendar-navigation {
        grid-template-columns:
            34px
            auto
            1fr
            34px;

        padding:
            10px;

        gap:
            5px;
    }


    .calendar-navigation h2 {
        font-size: calc(14px * var(--text-scale, 1));
    }


    .calendar-nav-button {
        width:
            34px;

        height:
            34px;
    }


    .calendar-today-button {
        padding:
            7px;

        font-size: calc(9px * var(--text-scale, 1));
    }


    .calendar-day {
        min-height:
            67px;

        padding:
            4px;
    }


    .calendar-day-number {
        width:
            21px;

        height:
            21px;

        font-size: calc(9px * var(--text-scale, 1));
    }


    /*
        Telefonda uzun metinler yerine
        küçük renk şeritleri göster.
    */

    .calendar-event-preview {
        height:
            5px;

        padding:
            0;

        border-radius:
            10px;
    }


    .calendar-event-preview span {
        display:
            none;
    }


    .calendar-event-preview
    .calendar-event-dot {
        display:
            block;

        width:
            100%;

        height:
            100%;

        border-radius:
            10px;
    }


    .calendar-more {
        padding:
            0;

        font-size: calc(7px * var(--text-scale, 1));
    }


    .calendar-weekdays span {
        font-size: calc(8px * var(--text-scale, 1));
    }


    .reminder-team-list {
        grid-template-columns:
            1fr;
    }


    .calendar-detail-item {
        grid-template-columns:
            40px
            1fr;
    }

}


/* =====================================================
   ÇOK DAR TELEFON
===================================================== */

@media (max-width: 430px) {

    .calendar-toolbar {
        flex-direction:
            column;
    }


    .calendar-toolbar
    .primary-button {
        width:
            100%;
    }


    .calendar-navigation h2 {
        font-size: calc(12px * var(--text-scale, 1));
    }


    .calendar-day {
        min-height:
            58px;
    }


    .calendar-item-type {
        grid-template-columns:
            1fr;
    }

}