﻿.booking-shell {
    display: flex;
    height: 100vh;
    width: 100%;
    font-family: var(--font);
}

.booking-sidebar {
    width: 380px;
    /*background: linear-gradient(180deg, #243746, #1e2d3a);*/
    background: var(--Primary);
    color: var(--text-color);
    padding: 2.5rem 2rem;
    display: flex;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

/* BRANDING */
.sidebar-brand {
    text-align: left;
}

.brand-logo {
    width: 120px;
    max-height: 120px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.brand-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.4;
}

/* SECTIONS */
.sidebar-section {
    margin-top: 2.5rem;
}

.section-title {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

.sidebar-section p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* FOOTER */
.sidebar-footer {
    margin-top: auto;
    font-size: 0.85rem;
}

.footer-text {
    opacity: 0.85;
    margin-bottom: 1.25rem;
}

.contact-block {
    margin-bottom: 0.75rem;
}

.contact-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.contact-value {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
}

    .contact-value:hover {
        text-decoration: underline;
    }

.insurance-note {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
    line-height: 1.4;
}

.booking-main {
    flex: 1;
    /*background: linear-gradient(135deg, #9fdcc6, #8fd1b8);*/
    background: var(--Secondary);
    overflow-y: auto;
    padding: 2rem 2rem;
}

.booking-content {
    /*max-width: 980px;*/
    margin: 0 auto;
}

/*.booking-content > * {
    background: #ffffff;
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
*/

.booking-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.section-title {
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .6;
}

.form-check-group label {
    margin-right: 1.5rem;
    font-weight: 500;
}

.booking-form label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.35rem;
}

.booking-form .form-floating label {
    position: static !important;
    transform: none !important;
}

.booking-form .section-title {
    color: #355f54;
    font-weight: 600;
}

.booking-form .form-check span {
    color: #2c3e50;
}

.booking-card-header h2 {
    color: #1f2d3d;
}

.booking-card-header p {
    color: #5f6f7a;
}

@media (max-width: 991.98px) {

    .booking-shell {
        flex-direction: column;
    }

    .booking-sidebar {
        width: 100%;
        padding: 2rem 1.5rem;
    }

    .sidebar-content {
        max-width: 720px;
        margin: 0 auto;
    }

    .booking-main {
        padding-top: 1.5rem;
    }
}

@media (max-width: 767.98px) {

    .booking-sidebar > .sidebar-content > .sidebar-section,
    .booking-sidebar > .sidebar-content > .sidebar-footer {
        display: none;
    }

    #mobile-help .sidebar-section {
        display: block;
    }

    .booking-sidebar {
        padding: 1.25rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .brand-logo {
        max-width: 80px;
        margin-bottom: 0.75rem;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .brand-subtitle {
        font-size: 0.8rem;
    }

    .booking-main {
        padding: 1.5rem 1rem;
    }

    .booking-content {
        max-width: 100%;
    }

    .booking-sidebar > .sidebar-content > .sidebar-section,
    .booking-sidebar > .sidebar-content > .sidebar-footer {
        display: none;
    }

    .booking-sidebar {
        padding: 1.25rem 1rem;
    }
}


.summary-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid rgba(0,0,0,.05);
    border-radius: 10px;
    background: #fafafa;
}

.summary-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.summary-value {
    font-size: 1.05rem;
    color: #355f54;
}

.btn, button {
    background-color: var(--Buttons) !important;
    color: var(--text-color) !important;
}

/* =========================================================
   ONLINE DIARY THEME TYPOGRAPHY
   Applies the configured font colour to booking content,
   while deliberately preserving Flatpickr calendar states.
   ========================================================= */

.booking-layout .booking-main,
.booking-layout .booking-main .booking-content {
    color: var(--text-color);
}

    /* General booking headings and explanatory text. */
    .booking-layout .booking-main .booking-content :is( h1, h2, h3, h4, h5, h6, p, strong, small, label, legend, .booking-title, .booking-card-header h2, .booking-card-header p, .booking-form label, .booking-form .section-title, .booking-form .form-check span, .diary-section-title, .diary-section-subtitle, .diary-name, .diary-icon, .service-section-title, .service-section-subtitle, .service-name, .service-duration, .service-price, .section-title, .section-subtitle, .summary-label, .summary-value, .ae-summary-item, .ae-summary-item span, .ae-summary-note, .payment-option-box, #Payment h6, #Payment .fw-bold, #Payment .service-section-title, .form-text, .text-muted ) {
        color: var(--text-color) !important;
    }

    /* Service/date/time cards, excluding Flatpickr's own calendar cells. */
    .booking-layout .booking-main .booking-content :is( .service-item, .date-item, .date-day, .date-full, .time-item ) {
        color: var(--text-color) !important;
    }

    /* Regular links in the booking flow. */
    .booking-layout .booking-main .booking-content a:not(.btn) {
        color: var(--text-color) !important;
    }

    /* Keep non-calendar disabled time slots visually subdued. */
    .booking-layout .booking-main .booking-content .disabled-time {
        color: var(--text-color) !important;
        opacity: 0.5;
    }

/* Keep validation colours semantic rather than theme-coloured. */
.booking-layout .booking-main .booking-content :is( .text-danger, .invalid-feedback, .field-validation-error ) {
    color: #dc3545 !important;
}

.booking-layout .booking-main .booking-content :is( .text-success, .valid-feedback ) {
    color: #198754 !important;
}

.booking-layout .booking-main .booking-content .text-warning {
    color: #997404 !important;
}

/* =========================================================
   ONLINE DIARY THEME CARD SURFACES
   Keep this as the final section in online-booking.css.
   Flatpickr is intentionally not included.
   ========================================================= */

:root {
    --booking-card-surface: #ffffff;
    --booking-card-surface-alt: #f7faf8;
    --booking-card-surface-hover: #edf7f3;
    --booking-card-surface-selected: #e8f1ed;
    --booking-card-border: #b7d5c9;
    --booking-card-border-soft: #dcebe4;
    --booking-card-accent: #2f4050;
    --booking-time-surface: #8bd0ba;
    --booking-time-selected: #2f4050;
}

    /* Main content panels. */
    .booking-layout .booking-content :is( .booking-header, .booking-card, .diary-box, .service-box, .invoice, .ae-summary-box, #Time ) {
        background-color: var(--booking-card-surface) !important;
        border-color: var(--booking-card-border-soft) !important;
        color: var(--text-color) !important;
        box-shadow: 0 14px 32px rgb(0 0 0 / 0.10);
    }

    /* Bootstrap cards that may be rendered by invoice/payment partials. */
    .booking-layout .booking-content .card {
        background-color: var(--booking-card-surface) !important;
        border-color: var(--booking-card-border-soft) !important;
        color: var(--text-color) !important;
        box-shadow: 0 14px 32px rgb(0 0 0 / 0.10);
    }

    /* Interactive booking tiles and small information cards. */
    .booking-layout .booking-content :is( .service-item, .date-item, .time-item, .summary-item, .ae-summary-item, .payment-option-box ) {
        background-color: var(--booking-card-surface-alt) !important;
        border-color: var(--booking-card-border) !important;
        color: var(--text-color) !important;
    }

    /* Hover states retain the configured theme but provide visual feedback. */
    .booking-layout .booking-content :is( .service-item, .date-item, .time-item, .payment-option-box, .selectable-payment ):hover:not(.disabled-time) {
        background-color: var(--booking-card-surface-hover) !important;
        border-color: var(--booking-card-accent) !important;
        box-shadow: 0 6px 16px rgb(0 0 0 / 0.10);
    }

    /* Chosen service, date, time, and payment method. */
    .booking-layout .booking-content :is( .date-item.selected, .time-item.selected, .selected-payment, .service-item.selected, .payment-option-box.selected ) {
        background-color: var(--booking-card-surface-selected) !important;
        border-color: var(--booking-card-accent) !important;
        color: var(--text-color) !important;
        box-shadow: inset 0 0 0 1px var(--booking-card-accent), 0 7px 18px rgb(0 0 0 / 0.12);
    }

    /* Preserve visible disabled time-slot differentiation. */
    .booking-layout .booking-content .disabled-time {
        background-color: var(--booking-card-surface-alt) !important;
        border-color: var(--booking-card-border-soft) !important;
        color: var(--text-color) !important;
        cursor: not-allowed;
        opacity: 0.48;
        box-shadow: none !important;
    }

    /* Keep cards visually aligned when a legacy selector sets white backgrounds. */
    .booking-layout .booking-content :is( .service-item, .date-item, .time-item, .summary-item, .ae-summary-item, .payment-option-box ) * {
        color: inherit;
    }

.booking-layout .booking-content .service-item {
    background-image: linear-gradient( 135deg, rgb(255 255 255 / 0.07), transparent 58% ) !important;
}

    .booking-layout .booking-content .service-item:hover {
        background-image: linear-gradient( 135deg, rgb(255 255 255 / 0.13), transparent 58% ) !important;
    }


/* =========================================================
   ONLINE DIARY – FINAL FORM + CALENDAR UX OVERRIDES
   Append after all existing online-booking.css rules.
   ========================================================= */

.booking-layout {
    --booking-control-surface: rgb(255 255 255 / 0.94);
    --booking-control-surface-focus: #ffffff;
    --booking-control-ink: #17324d;
    --booking-control-muted: #657b90;
    --booking-control-border: rgb(255 255 255 / 0.42);
    --booking-inner-panel: rgb(255 255 255 / 0.06);
    --booking-inner-panel-border: rgb(255 255 255 / 0.16);
}

    /* ---------------------------------------------------------
   DATE + TIME AREAS
   Give the date picker and time slots their own visible panes.
   --------------------------------------------------------- */

    .booking-layout #Time .booking-container > .calendar-wrapper,
    .booking-layout #Time .booking-container > .time-wrapper {
        background: var(--booking-inner-panel);
        border: 1px solid var(--booking-inner-panel-border);
        border-radius: 18px;
        padding: 1.1rem;
        box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
    }

    .booking-layout #Time .calendar-wrapper {
        align-self: flex-start;
    }

    .booking-layout #Time :is( .service-section-title, .section-title ) {
        color: #ffffff !important;
        opacity: 1;
    }

    .booking-layout #Time :is( .service-section-subtitle, .section-subtitle ) {
        color: rgb(255 255 255 / 0.78) !important;
        opacity: 1;
    }

    /* ---------------------------------------------------------
   CALENDAR
   Keep it intentionally light and high-contrast.
   --------------------------------------------------------- */

    .booking-layout #calendarPicker {
        display: none !important;
    }

    .booking-layout #calendarPicker .flatpickr-calendar.inline,
    .booking-layout #calendarPicker + .flatpickr-calendar.inline {
        width: 100% !important;
        max-width: none !important;
        background: var(--booking-calendar-surface) !important;
        border: 0 !important;
        border-radius: 13px !important;
        box-shadow: none !important;
    }

    /* Flatpickr renders an inline calendar beside its hidden host. Keep every
       internal row tied to the available panel width instead of its 307px default. */
    .booking-layout #calendarPicker + .flatpickr-calendar.inline :is(
        .flatpickr-rContainer,
        .flatpickr-weekdays,
        .flatpickr-weekdaycontainer,
        .flatpickr-days,
        .dayContainer) {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .booking-layout #calendarPicker + .flatpickr-calendar.inline :is(
        .flatpickr-weekday,
        .flatpickr-day) {
        flex: 0 0 calc(100% / 7) !important;
        max-width: calc(100% / 7) !important;
        box-sizing: border-box;
    }

@media (max-width: 767.98px) {
    .booking-layout #selectorSection {
        padding-right: 0;
        padding-left: 0;
    }

    .booking-layout #Time .booking-container {
        width: 100%;
        min-width: 0;
        gap: 1rem;
        padding: 0.75rem;
    }

    .booking-layout #Time .booking-container > .calendar-wrapper,
    .booking-layout #Time .booking-container > .time-wrapper {
        align-self: stretch;
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        padding: 0.75rem;
    }

    .booking-layout #calendarPicker + .flatpickr-calendar.inline {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

    .booking-layout .flatpickr-months {
        min-height: 48px;
        background: var(--booking-calendar-header) !important;
        border-bottom: 1px solid rgb(23 50 77 / 0.14) !important;
    }

    /* Fix the month/year controls that still look faded or invisible. */
    .booking-layout .flatpickr-current-month,
    .booking-layout .flatpickr-current-month span.cur-month,
    .booking-layout .flatpickr-current-month .flatpickr-monthDropdown-months,
    .booking-layout .flatpickr-current-month input.cur-year,
    .booking-layout .flatpickr-current-month .numInputWrapper {
        color: var(--booking-calendar-text) !important;
        -webkit-text-fill-color: var(--booking-calendar-text) !important;
        opacity: 1 !important;
        font-weight: 700 !important;
        text-shadow: none !important;
    }

        .booking-layout .flatpickr-current-month .flatpickr-monthDropdown-months,
        .booking-layout .flatpickr-current-month input.cur-year {
            background: transparent !important;
        }

    .booking-layout .flatpickr-monthDropdown-month {
        background: #ffffff;
        color: var(--booking-control-ink);
    }

    .booking-layout .flatpickr-prev-month,
    .booking-layout .flatpickr-next-month {
        color: var(--booking-calendar-text) !important;
        opacity: 1 !important;
    }

        .booking-layout .flatpickr-prev-month svg,
        .booking-layout .flatpickr-next-month svg {
            fill: var(--booking-calendar-text) !important;
        }

    .booking-layout span.flatpickr-weekday {
        color: var(--booking-calendar-muted) !important;
        font-weight: 700 !important;
    }

    .booking-layout .flatpickr-day {
        border-radius: 9px !important;
        color: var(--booking-calendar-text) !important;
        font-weight: 500;
    }

        .booking-layout .flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) {
            background: rgb(23 50 77 / 0.10) !important;
            border-color: transparent !important;
        }

        .booking-layout .flatpickr-day.prevMonthDay,
        .booking-layout .flatpickr-day.nextMonthDay {
            color: var(--booking-calendar-muted) !important;
            opacity: 0.58;
        }

        .booking-layout .flatpickr-day.flatpickr-disabled {
            color: var(--booking-calendar-muted) !important;
            opacity: 0.35;
            cursor: not-allowed !important;
        }

        .booking-layout .flatpickr-day.today {
            border: 2px solid var(--Buttons) !important;
            color: var(--booking-calendar-text) !important;
        }

        .booking-layout .flatpickr-day.selected,
        .booking-layout .flatpickr-day.selected:hover {
            background: var(--Buttons) !important;
            border-color: var(--Buttons) !important;
            color: var(--text-color) !important;
            font-weight: 700 !important;
        }


    /* Keep Flatpickr navigation controls inside the rounded calendar edge. */
    .booking-layout #calendarPicker + .flatpickr-calendar.inline
    .flatpickr-prev-month {
        top: 7px !important;
        left: 8px !important;
    }

    .booking-layout #calendarPicker + .flatpickr-calendar.inline
    .flatpickr-next-month {
        top: 7px !important;
        right: 8px !important;
    }

    .booking-layout #calendarPicker + .flatpickr-calendar.inline
    :is(.flatpickr-prev-month, .flatpickr-next-month) {
        width: 34px !important;
        height: 34px !important;
        padding: 9px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50% !important;
        background-color: transparent !important;
    }

        .booking-layout #calendarPicker + .flatpickr-calendar.inline
        :is(.flatpickr-prev-month, .flatpickr-next-month):is(:hover, :focus-visible) {
            background-color: rgb(255 255 255 / 0.55) !important;
        }

        .booking-layout #calendarPicker + .flatpickr-calendar.inline
        :is(.flatpickr-prev-month, .flatpickr-next-month) svg {
            width: 14px !important;
            height: 14px !important;
        }

    /* ---------------------------------------------------------
   FORM CONTROLS
   Light fields with dependable dark text and placeholders.
   --------------------------------------------------------- */

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) :is( .form-control, .form-select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) ) {
        background-color: var(--booking-control-surface) !important;
        border: 1px solid var(--booking-control-border) !important;
        color: var(--booking-control-ink) !important;
        -webkit-text-fill-color: var(--booking-control-ink) !important;
        box-shadow: inset 0 1px 1px rgb(23 50 77 / 0.06), 0 1px 0 rgb(255 255 255 / 0.08) !important;
    }

        .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) :is( .form-control, .form-select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) ):focus {
            background-color: var(--booking-control-surface-focus) !important;
            border-color: var(--Buttons) !important;
            color: var(--booking-control-ink) !important;
            box-shadow: 0 0 0 0.2rem rgb(255 255 255 / 0.16), inset 0 1px 1px rgb(23 50 77 / 0.04) !important;
        }

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) :is( input, textarea )::placeholder {
        color: var(--booking-control-muted) !important;
        -webkit-text-fill-color: var(--booking-control-muted) !important;
        opacity: 1 !important;
    }

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) input[type="date"] {
        color-scheme: light;
    }

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) .form-select {
        color: var(--booking-control-ink) !important;
    }

        .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) .form-select option {
            background: #ffffff;
            color: var(--booking-control-ink);
        }

    /* Keep labels readable on the branded panel. */
    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) :is( label, .form-label, .form-check-label ) {
        color: rgb(255 255 255 / 0.92) !important;
    }

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) :is( .section-title, .service-section-title ) {
        color: rgb(255 255 255 / 0.80) !important;
        opacity: 1 !important;
    }

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) hr {
        border-color: rgb(255 255 255 / 0.16) !important;
        opacity: 1;
    }

    .booking-layout :is( .booking-form, #InsuranceForm, #Payment ) :is( input[type="radio"], input[type="checkbox"] ) {
        accent-color: var(--Buttons);
    }

    /* Hide the original Flatpickr input; keep only the inline calendar. */
    .booking-layout #calendarPicker > input.flatpickr-input,
    .booking-layout #calendarPicker > input[type="text"] {
        display: none !important;
    }

    /* Online diary: theme the empty-service Bootstrap alert without changing shared markup. */
    .booking-layout .booking-content #Service > .alert.alert-info {
        --bs-alert-color: var(--text-color);
        --bs-alert-bg: var(--booking-card-surface-alt);
        --bs-alert-border-color: var(--booking-card-border);
        color: var(--text-color) !important;
        background-color: var(--booking-card-surface-alt) !important;
        border-color: var(--booking-card-border) !important;
    }

        .booking-layout .booking-content #Service > .alert.alert-info
        :is(i, p, small, .text-muted) {
            color: var(--text-color) !important;
        }

        .booking-layout .booking-content #Service > .alert.alert-info small {
            opacity: 0.82;
        }

    /* Main content panels, including shared invoice/payment panels. */
    .booking-layout .booking-content :is( .booking-header, .booking-card, .diary-box, .service-box, .invoice, .boxed2, .ae-summary-box, #Time ) {
        background-color: var(--booking-card-surface) !important;
        border-color: var(--booking-card-border-soft) !important;
        color: var(--text-color) !important;
        font-family: var(--font) !important;
        box-shadow: 0 14px 32px rgb(0 0 0 / 0.10);
    }

    /* Shared invoice table inside a themed Online Diary card. */
    .booking-layout .booking-content .boxed2 .table {
        --bs-table-color: var(--text-color);
        --bs-table-bg: transparent;
        --bs-table-border-color: var(--booking-card-border-soft);
        --bs-table-striped-color: var(--text-color);
        --bs-table-striped-bg: rgb(255 255 255 / 0.08);
        color: var(--text-color) !important;
        font-family: var(--font) !important;
    }

    .booking-layout .booking-content .boxed2
    :is(.form-control, .input-group-text) {
        background-color: var(--booking-control-surface) !important;
        border-color: var(--booking-control-border) !important;
        color: var(--booking-control-ink) !important;
        -webkit-text-fill-color: var(--booking-control-ink) !important;
    }


    .booking-layout .booking-content :is( .booking-header, .booking-card, .diary-box, .service-box, .invoice, .boxed2, .gp-dropin-wrapper, .ae-summary-box, #Time ) {
        background-color: var(--booking-card-surface) !important;
        border-color: var(--booking-card-border-soft) !important;
        color: var(--text-color) !important;
        font-family: var(--font) !important;
        box-shadow: 0 14px 32px rgb(0 0 0 / 0.10);
    }

    /* Global Payments adds secure-payment-form to #credit-card-form itself. */
    .booking-layout .booking-content
    .gp-dropin-wrapper #credit-card-form.secure-payment-form label {
        color: var(--text-color) !important;
        -webkit-text-fill-color: var(--text-color) !important;
        font-family: var(--font) !important;
    }

    /* Stack expiry and CVV in the narrow Online Diary payment column. */
    .booking-layout #credit-card-form.secure-payment-form
    :is(.credit-card-card-expiration, .credit-card-card-cvv) {
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /*
 * The GP CVV field is transparent. Give both the iframe and its backing
 * container a white surface so the branded card colour cannot show through.
 */
    .booking-layout #credit-card-form.secure-payment-form
    .credit-card-card-cvv-target {
        background-color: #fff !important;
        border-radius: 6px;
    }

    .booking-layout #credit-card-form.secure-payment-form
    .credit-card-card-cvv iframe {
        display: block;
        width: 100% !important;
        float: none !important;
        background-color: #fff !important;
        border-radius: 6px;
    }

    .booking-layout .appointment-confirmation-card {
        border: 1px solid var(--booking-card-border-soft);
        font-family: var(--font);
    }

    .booking-layout .appointment-confirmation-title {
        font-size: 2rem;
    }

    .booking-layout .appointment-confirmation-divider {
        border: 0;
        border-top: 3px solid var(--booking-card-border);
        opacity: 0.6;
    }

    /* Use the configured secondary colour exactly for available time slots. */
    .booking-layout .booking-content
    .time-item:not(.disabled-time):not(.selected) {
        background-color: var(--booking-time-surface) !important;
        border-color: var(--booking-time-surface) !important;
    }

        /* Keep the exact colour on hover; use the button colour for the outline. */
        .booking-layout .booking-content
        .time-item:not(.disabled-time):not(.selected):hover {
            background-color: var(--booking-time-surface) !important;
            border-color: var(--Buttons) !important;
        }

    /* A selected time uses the configured button colour exactly. */
    .booking-layout .booking-content .time-item.selected {
        background-color: var(--booking-time-selected) !important;
        border-color: var(--booking-time-selected) !important;
    }


    .booking-layout .booking-main .booking-content :is( h1, h2, h3, h4, h5, h6, p, strong, small, label, legend, .booking-title, .booking-card-header h2, .booking-card-header p, .booking-form label, .booking-form .section-title, .booking-form .form-check span, .diary-section-title, .diary-section-subtitle, .diary-name, .diary-icon, .service-section-title, .service-section-subtitle, .service-name, .service-duration, .service-price, .section-title, .section-subtitle, .summary-label, .summary-value, .fw-bold, .ae-summary-item, .ae-summary-item span, .ae-summary-note, .payment-option-box, #Payment h6, #Payment .service-section-title, .form-text, .text-muted ) {
        color: var(--text-color) !important;
    }


    /* Online Diary GP and payment selection */

    .booking-layout .online-diary-choice-subtitle {
        margin: 0;
        color: var(--text-color) !important;
        opacity: 0.82;
    }

    .booking-layout .online-diary-details-panel {
        padding: 1rem;
        border: 1px solid var(--booking-card-border);
        border-radius: 12px;
        background: var(--booking-inner-panel);
    }

    .booking-layout .online-diary-payment-options {
        align-items: stretch;
    }

    .booking-layout .online-diary-payment-option {
        position: relative;
        overflow: visible;
        display: flex !important;
        flex-direction: column;
        width: 100%;
        min-height: 190px;
        margin: 0 !important;
        padding: 1rem;
        border: 1px solid var(--booking-card-border) !important;
        border-radius: 10px;
        background: var(--booking-card-surface-alt) !important;
        color: var(--text-color) !important;
        cursor: pointer;
        transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    }

        .booking-layout .online-diary-payment-option:hover {
            background: var(--booking-card-surface-hover) !important;
            border-color: var(--Buttons) !important;
            box-shadow: 0 6px 16px rgb(0 0 0 / 12%);
            transform: translateY(-1px);
        }

    .booking-layout
    .booking-content
    #selectorSection
    .payment-option-input:checked + .online-diary-payment-option {
        background: color-mix( in srgb, var(--Buttons) 14%, #ffffff ) !important;
        border: 3px solid var(--Buttons) !important;
        box-shadow: 0 0 0 4px color-mix( in srgb, var(--Buttons) 22%, transparent ), 0 12px 24px rgb(0 0 0 / 20%) !important;
        transform: translateY(-3px);
    }

        .booking-layout
        .booking-content
        #selectorSection
        .payment-option-input:checked + .online-diary-payment-option:hover {
            transform: translateY(-3px);
        }

        .booking-layout
        .booking-content
        #selectorSection
        .payment-option-input:checked + .online-diary-payment-option::after {
            content: "✓ Selected";
            position: absolute;
            top: -14px;
            right: 12px;
            padding: 0.3rem 0.7rem;
            border: 2px solid #ffffff;
            border-radius: 999px;
            background: var(--Buttons);
            color: var(--text-color);
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            line-height: 1.2;
            box-shadow: 0 4px 10px rgb(0 0 0 / 20%);
        }

    .booking-layout
    .payment-option-input:focus-visible + .online-diary-payment-option {
        outline: 3px solid color-mix( in srgb, var(--Buttons) 45%, transparent );
        outline-offset: 3px;
    }

    .booking-layout .online-diary-payment-option__heading {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        margin-bottom: 0.75rem;
    }

        .booking-layout .online-diary-payment-option__heading h6 {
            margin: 0;
            color: var(--text-color) !important;
            font-size: 1rem;
            font-weight: 700;
        }

    .booking-layout
    .online-diary-payment-option
    .payment-option-icon {
        width: 1.15rem;
        color: var(--Buttons) !important;
        font-size: 1.05rem;
    }

    .booking-layout
    .online-diary-payment-option__description {
        margin-bottom: 1rem;
        color: var(--text-color) !important;
        line-height: 1.5;
        opacity: 0.82;
    }

    .booking-layout .online-diary-payment-option__action {
        display: block;
        width: 100%;
        margin-top: auto;
        padding: 0.55rem 0.75rem;
        border-radius: 6px;
        background: var(--Buttons);
        color: var(--text-color) !important;
        font-weight: 600;
        text-align: center;
        pointer-events: none;
    }

    /* Ensure readable text on Online Diary payment cards. */
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__heading h6,
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__description {
        color: var(--Primary) !important;
        -webkit-text-fill-color: var(--Primary) !important;
    }

    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__description {
        opacity: 0.82;
    }

    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option
    .payment-option-icon {
        color: var(--Buttons) !important;
        -webkit-text-fill-color: var(--Buttons) !important;
    }

    /* Retain the configured button text colour. */
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__action {
        color: var(--text-color) !important;
        -webkit-text-fill-color: var(--text-color) !important;
    }

    /* Online Diary time slots use the configured font colour. */
    .booking-layout
    .booking-content
    #timeSection
    .time-item:not(.disabled-time) {
        color: var(--text-color) !important;
        -webkit-text-fill-color: var(--text-color) !important;
    }

    /* Keep these Online Diary surfaces true to the configured brand colour. */
    .booking-layout .booking-content #Service .service-item,
    .booking-layout .booking-content #Service .service-item:hover,
    .booking-layout .booking-content #Service .service-item.selected,
    .booking-layout .booking-content .booking-card .summary-item {
        background-color: var(--Secondary) !important;
        background-image: none !important;
    }

    /* Use the configured Online Diary colours without generated shading. */
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .payment-option-input + .online-diary-payment-option,
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .payment-option-input:checked + .online-diary-payment-option {
        background: var(--Secondary) !important;
        color: var(--text-color) !important;
    }

    /* Payment card text uses the configured font colour. */
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__heading h6,
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__description {
        color: var(--text-color) !important;
        -webkit-text-fill-color: var(--text-color) !important;
    }

    /* Payment card actions use the configured button colour. */
    .booking-layout
    .booking-main
    .booking-content
    #selectorSection
    .online-diary-payment-option__action {
        background: var(--Buttons) !important;
        color: var(--text-color) !important;
        -webkit-text-fill-color: var(--text-color) !important;
    }

@media (max-width: 767px) {
    .booking-layout
    .booking-content
    :is( .booking-header,
    .diary-box,
    #Time )
    {
      padding: 0 !important;
    }
}
