/* --- Principal Outer Structural Frame --- */
.booking-expander-container {
    width: fit-content;
    max-width: 840px;           /* narrowed whole-tool profile */
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e1e6eb;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 75, 135, 0.04);
    box-sizing: border-box;
    overflow: hidden;
}

/* Inside a contact expander: flush card, no hero margin */
.contact-expander-body .booking-expander-container {
    margin: 0 auto;
}
/* Constrain the scheduler grid to the expander width so the card fits
   without overflowing the 620px body frame. Desktop only — the existing
   mobile rule collapses the scheduler to a single column. */
@media (min-width: 821px) {
    .contact-expander-body .booking-scheduler {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Message-only variant: card fills the expander frame and flows with it */
.booking-expander-container.booking-message-container {
    width: 100%;
    padding: 20px;
}
.booking-message-container .booking-fields {
    border-top: 0;
    margin-top: 0;
}


/* --- Tool header (page context above the booking tool) --- */
.booking-tool-head {
    max-width: 640px;
    margin: 0 auto 28px;
    text-align: center;
}
.booking-tool-head h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111111;
    margin: 10px 0 8px;
    line-height: 1.25;
}
.booking-tool-lede {
    font-size: 1rem;
    line-height: 1.6;
    color: #57606a;
    margin: 0;
}


/* --- Booking matrix: calendar + time windows --- */
.booking-interactive-viewport {
    padding: 0;
    min-width: 0;
}

.booking-scheduler {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, clamp(230px, 26vw, 280px));
    gap: 20px;
}


/* --- Calendar grid (dense) --- */
.booking-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.calendar-month-label {
    font-weight: 700;
    font-size: 1rem;
    color: #111111;
}
.calendar-nav {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #d7dde3;
    background: #ffffff;
    color: #004b87;
    border-radius: 3px;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.calendar-nav:hover:not(:disabled) { background: rgba(0, 75, 135, 0.05); border-color: #004b87; }
.calendar-nav:disabled { opacity: 0.35; cursor: default; }
.calendar-nav:focus-visible { outline: 2px solid #004b87; outline-offset: 2px; }

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b95a1;
    margin-bottom: 4px;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}
.calendar-cell {
    min-height: 21px;            /* month compressed ~30% (was 30px) */
    padding: 0;
    border: 0;
    background: #ffffff;
    border-radius: 3px;
    color: #222222;
    font-size: 0.74rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s ease;
}
.calendar-cell:hover:not(:disabled):not(.is-blank) { background: rgba(0, 75, 135, 0.08); }
.calendar-cell.is-today {
    color: #004b87;
    font-weight: 700;
    position: relative;
}
.calendar-cell.is-today::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;    /* brass-blue dot under today */
    margin: 1px auto 0;
}
.calendar-cell.is-selected { background: #004b87; color: #ffffff; font-weight: 700; }
.calendar-cell.is-blank { background: transparent; cursor: default; }
.calendar-cell.is-past, .calendar-cell:disabled { color: #c1c7ce; cursor: default; }
.calendar-cell:focus-visible { outline: 2px solid #004b87; outline-offset: 1px; }



/* --- Duration + type toggles (30/60, Audio/Video) --- */
.booking-meta-toggles {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}
.booking-duration {
    flex: 1;
    display: flex;
    margin: 0;
    border: 1px solid #d7dde3;
    border-radius: 3px;
    overflow: hidden;
}
.bk-duration-btn {
    flex: 1;
    height: 21px;               /* match .calendar-cell selected-day height */
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #ffffff;
    color: #004b87;
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.bk-duration-btn + .bk-duration-btn { border-left: 1px solid #d7dde3; }
.bk-duration-btn.is-active { background: #004b87; color: #ffffff; }
.bk-duration-btn:hover:not(.is-active) { background: rgba(0, 75, 135, 0.05); }
.bk-duration-btn:focus-visible { outline: 2px solid #004b87; outline-offset: -2px; }

/* --- Timezone selector (time column) --- */
.booking-tz-select {
    width: 100%;
    height: 30px;               /* match calendar header row so the timezone
                                   text shares the same line as the month label */
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #222222;
    font-size: 0.74rem;
    font-family: inherit;
    cursor: pointer;
}
.booking-tz-select:focus-visible { outline: 2px solid #004b87; outline-offset: 1px; }

.time-column-wrapper {
    display: flex;
    flex-direction: column;
    height: var(--bk-pane-h, auto);
    min-height: 150px;          /* tz select + toggles + 4 rows of slots */
}
.time-slots-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 102px;          /* exactly 4 rows: 4×21px row + 3×6px gap */
    overflow-y: auto;          /* scrolls when slots exceed the pane height */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    align-content: start;
}
.time-slot-trigger {
    width: 100%;
    height: 21px;               /* same row height as day cells and toggles */
    box-sizing: border-box;
    padding: 3px 6px;            /* 50% denser vertical padding */
    border: 1px solid #004b87;
    background: #ffffff;
    color: #222222;               /* same colour/font as the day picker */
    font-weight: 400;
    font-size: 0.74rem;
    font-family: inherit;
    border-radius: 2px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}
.time-slot-trigger:hover { background: rgba(0, 75, 135, 0.05); }
.time-slot-trigger.is-active { background: #004b87; color: #ffffff; }
.time-slot-trigger:focus-visible { outline: 2px solid #004b87; outline-offset: 2px; }
.time-slots-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 24px 0;
    text-align: center;
    font-size: 0.74rem;
    color: #8b95a1;
}


/* --- Details panel spanning both columns --- */
.booking-fields {
    grid-column: 1 / -1;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef1f4;
    display: grid;
    gap: 10px;
}
.booking-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
}
.booking-fields-row--single {
    grid-template-columns: 1fr;
}
.booking-field {
    display: grid;
    min-width: 0;
}
.booking-slot-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #222222;
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 0 2px;
}
.booking-fields-action {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;  /* confirm sits on the lhs */
}
.booking-submit-status {
    font-size: 0.74rem;
    line-height: 1.4;
}
.booking-submit-status.bk-error { color: #b91c1c; }
.booking-submit-status.bk-success { color: #15803d; }
.booking-field input,
.booking-field select,
.booking-field textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.74rem;          /* matches day-picker cell type */
    color: #222222;
    background: #ffffff;
    border: 1px solid #d7dde3;
    border-radius: 3px;
    padding: 6px 8px;
}
.booking-confirm-go {
    height: 21px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #ffffff;
    color: #004b87;
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.booking-confirm-go:hover { background: rgba(0, 75, 135, 0.05); }
.booking-confirm-go:disabled { opacity: 0.6; cursor: default; }
.booking-field textarea {
    resize: vertical;
    min-height: 40px;
}
.booking-field input:focus-visible,
.booking-field select:focus-visible,
.booking-field textarea:focus-visible {
    outline: 2px solid #004b87;
    outline-offset: 1px;
}
.booking-field select option:disabled {
    color: #8b95a1;
}


/* Mobile Breakpoint Collapse */
@media (max-width: 820px) {
    .booking-scheduler {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    .booking-fields-row {
        grid-template-columns: 1fr;
    }
}
