﻿/* ---------- Generic modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

    .modal.is-open {
        display: block;
    }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(249, 246, 240, 0.70);
    backdrop-filter: blur(14px);
}

.modal__panel {
    position: relative;
    max-width: 720px;
    margin: 6vh auto 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,245,239,0.98));
    box-shadow: 0 36px 100px rgba(15, 23, 42, 0.16);
}

    .modal__panel::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 26px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
        pointer-events: none;
    }

.modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.72));
}

.modal__kicker {
    color: rgba(28, 28, 31, 0.58);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal__title {
    margin: 4px 0 2px;
    color: #121826;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.modal__sub {
    color: rgba(28, 28, 31, 0.72);
    font-size: 13px;
}

.modal__body {
    padding: 16px 20px 20px;
}

.segmented {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal__chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* ---------- Calendar ---------- */
.cal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cal__month {
    color: #121826;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cal__dow,
.cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal__dow {
    margin-bottom: 8px;
    color: rgba(27, 27, 31, 0.52);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.cal__day {
    display: grid;
    place-items: center;
    height: 44px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    background: rgba(255,255,255,0.90);
    color: #1c1c1f;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

    .cal__day:hover {
        transform: translateY(-1px);
        background: rgba(15, 23, 42, 0.05);
        border-color: rgba(15, 23, 42, 0.12);
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    }

    .cal__day.is-out {
        color: rgba(27, 27, 31, 0.40);
        opacity: 0.62;
    }

        .cal__day.is-out:not(.is-disabled) {
            background: rgba(15, 23, 42, 0.03);
            color: rgba(27, 27, 31, 0.75);
            opacity: 0.72;
        }

    .cal__day.is-selected {
        border-color: transparent;
        background: rgba(122, 24, 32, 0.12);
        color: #7a1820;
        font-weight: 700;
    }

    .cal__day.is-disabled,
    .cal__day:disabled {
        border-color: rgba(15, 23, 42, 0.04);
        background: rgba(15, 23, 42, 0.02);
        color: rgba(27, 27, 31, 0.26);
        cursor: not-allowed;
        opacity: 0.45;
        pointer-events: none;
        text-decoration: none;
        transform: none;
    }

.chip {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.9);
    color: #1c1c1f;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.chip {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    user-select: none;
    color: rgba(27, 27, 31, 0.72);
    background: rgba(255,255,255,0.9);
}

    .chip:hover {
        transform: translateY(-1px);
        background: rgba(15, 23, 42, 0.05);
        border-color: rgba(15, 23, 42, 0.12);
    }

    .chip[aria-pressed="true"] {
        border-color: transparent;
        background: rgba(122, 24, 32, 0.12);
        color: #7a1820;
        font-weight: 700;
    }
    
    .chip:disabled,
    .chip[aria-disabled="true"] {
        border-color: rgba(15, 23, 42, 0.05);
        background: rgba(15, 23, 42, 0.02);
        color: rgba(17, 24, 39, 0.34);
        opacity: 0.55;
        cursor: not-allowed;
        pointer-events: none;
        transform: none;
    }


.segmented {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.segmented__btn {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.9);
    color: #1c1c1f;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.segmented__btn {
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 13px;
}

    .segmented__btn:hover {
        border-color: rgba(15, 23, 42, 0.14);
        background: #fff;
    }

    .segmented__btn.is-active {
        background: rgba(122, 24, 32, 0.12);
        border-color: transparent;
        color: #7a1820;
        font-weight: 600;
    }

.iconbtn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.92);
    color: #1c1c1f;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

    .iconbtn:hover {
        border-color: rgba(15, 23, 42, 0.14);
        background: #ffffff;
    }

#datePickerConfirm,
#timePickerConfirm {
    border: 1px solid rgba(122, 24, 32, 0.10);
    background: linear-gradient(135deg, #8a1a24, #6a121a);
    color: #fff;
    box-shadow: 0 10px 20px rgba(122, 24, 32, 0.18);

}

    #datePickerConfirm.btn:disabled,
    #timePickerConfirm.btn:disabled {
        opacity: 0.45;
        filter: saturate(0.85);
        cursor: not-allowed;
    }