﻿:root {
    --color-primary: #006EB3;
    --color-secondary: #233E6F;
    --Extended-Palette-Ice-Blue: #EBF3F9;
    --Supporting-Grey: #B8B6B0;
    --Supporting-Silver-Gray: #e2e5ea;
    --color-accent: #DA291C;
    --Extended-Palette-Grayish-Blue: #F5F7FA);
}

/* ---------- Scrollable body ---------- */
.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px 20px 8px;
    -webkit-overflow-scrolling: touch;
}

.divider {
    height: 1px;
    background: var(--Supporting-Grey);
    margin: 4px 0;
    transition: background-color 0.8s ease;
}

/* ---------- Accordion ---------- */
.accordion-item{
    border:0px;
}

.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    cursor: pointer;
    text-align: left;
    color: var(--color-secondary);
}

.chevron {
    width: 22px;
    height: 22px;
    padding: 0px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    /*flex-shrink: 0;*/
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
    background-color: var(--Extended-Palette-Ice-Blue);
}

.chevron i {
    font-size: 10px;
}

    .chevron:hover {
        background-color: var(--color-secondary);
        color: #fff;
        border-color: var(--color-secondary);
    }

.divider:has(+ .accordion-item .accordion-trigger[aria-expanded="true"]) {
    background: var(--color-primary);
}

.accordion-trigger[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
    background-color: var(--color-secondary);
    color: #fff !important;
    border-color: var(--color-secondary);
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
}

.accordion-panel-inner {
    padding-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #3c4450;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 30, 0.45);
    display: none;
    align-items: baseline;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    max-height: 100vh;
}

    .modal-overlay.open {
        display: flex;
    }

.modal {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 360px;
    border-radius: 14px;
    align-self: flex-end;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 92vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--Supporting-Silver-Gray);
}

.close-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    padding: 0px;
    background: var(--color-primary);
    border: none;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .close-btn:hover {
        background: var(--color-secondary);
    }

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 8px;
}

    .calendar-nav .month-label {
        font-weight: 700;
        font-size: 15px;
        color: #1f2733;
    }

.nav-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    padding: 0px;
    border: 1px solid var(--color-primary);
    background: #fff;
    color: var(--color-primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .nav-btn:disabled {
        color: #c7cbd1;
        border-color: var(--Supporting-Silver-Gray);
        cursor: not-allowed;
    }

    .nav-btn:not(:disabled):hover {
        background: #f0f6ff;
    }

.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 4px 12px 0;
    text-align: center;
}

    .weekday-row span {
        font-size: 12px;
        color: var(--Supporting-Gray);
        padding: 6px 0;
    }

.day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 6px;
    padding: 4px 12px 14px;
}

.day-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}

.day-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    padding: 0px;
    border: none;
    background: var(--Extended-Palette-Grayish-Blue);
    color: var(--Supporting-Charcoal);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .day-btn:hover:not(:disabled) {
        background: var(--Extended-Palette-Ice-Blue);
    }

    .day-btn:disabled {
        background: transparent;
        color: #d3d6db;
        cursor: not-allowed;
    }

    .day-btn.other-month {
        background: transparent;
        color: #d3d6db;
    }

    .day-btn.selected {
        background: var(--color-primary);
        color: #fff;
        font-weight: 700;
    }

.helper-text {
    padding: 20px 0px;
    margin: 0px 25px;
    border-top: 1px solid var(--Supporting-Silver-Gray);
    font-size: 13px;
    line-height: 1.45;
    color: #3c4450;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: var( --Extended-Palette-Grayish-Blue);
    border-top: 1px solid var(--Supporting-Silver-Gray);
}

.done-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 10px 0px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

    .done-btn:hover {
        background: var(--color-secondary);
    }