/* Booking page (24H Kyalami). Colors, fonts and spacing variables come from style.css. */

/* ---------- Intro ---------- */

/* .page-h removes the side padding of .wrap, so it is set again here to line up with the form below */
.booking-intro {
    padding: 56px 20px 12px;
}

.booking-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.booking-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 40px;
    font: 700 15px Rajdhani, sans-serif;
}

.booking-section {
    padding-top: 24px;
}

/* ---------- Layout ---------- */

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(275px, 1fr);
    gap: 24px;
    align-items: start;
}

.booking-panel {
    background: var(--w);
    border: 1px solid var(--bg);
    border-radius: var(--r);
    padding: 30px;
    box-shadow: 0 6px 28px rgba(11, 14, 15, .035);
    /* keeps the top of the form below the sticky header when the page scrolls to the next step */
    scroll-margin-top: 96px;
}

.booking-aside {
    background: var(--bg);
    border-bottom: 3px solid var(--p);
    border-radius: var(--r);
    padding: 26px;
    position: sticky;
    top: 100px;
}

.booking-aside h2 {
    font-size: 26px;
    margin: 0 0 16px;
}

.booking-aside p {
    margin: 10px 0;
}

.booking-small {
    font-size: 14px;
    margin-top: 16px;
}

/* ---------- Summary ---------- */

.booking-amount {
    color: var(--p);
    font: 700 39px/1 Rajdhani, sans-serif;
}

.booking-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(20, 20, 26, .13);
}

.booking-price-row:last-of-type {
    border-bottom: 0;
}

.booking-price-row strong {
    white-space: nowrap;
}

.booking-notice {
    background: #fff;
    padding: 14px;
    border-left: 3px solid var(--p);
    border-radius: 7px;
    margin-top: 18px;
    font-size: 14px;
}

/* ---------- Progress ---------- */

.booking-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.booking-progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font: 700 14px/1.2 Rajdhani, sans-serif;
    color: var(--mut);
    min-width: 0;
    overflow-wrap: anywhere;
}

.booking-progress-item::before {
    content: "";
    height: 5px;
    background: #cfd0d4;
    border-radius: 4px;
}

.booking-progress-item.is-active {
    color: var(--ink);
}

.booking-progress-item.is-current {
    color: var(--p);
}

.booking-progress-item.is-active::before {
    background: var(--p);
}

/* ---------- Steps ---------- */

.booking-step[hidden] {
    display: none !important;
}

.booking-step h2 {
    font-size: 32px;
    margin: 0 0 10px;
}

/* the heading only receives focus from the script, so no outline box is needed */
.booking-step h2:focus {
    outline: none;
}

.booking-lead {
    margin-bottom: 22px;
}

/* ---------- Package options ---------- */

.booking-options {
    display: grid;
    gap: 14px;
}

.booking-option {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border: 2px solid #d0d0d4;
    padding: 20px;
    border-radius: var(--r);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.booking-option:has(input:checked) {
    border-color: var(--p);
    background: rgba(193, 32, 47, .045);
}

.booking-option:focus-within {
    outline: 2px solid var(--p);
    outline-offset: 2px;
}

.booking-option input[type=radio] {
    width: auto;
    margin-top: 5px;
    accent-color: var(--p);
    flex: 0 0 auto;
}

.booking-option strong {
    display: block;
    font: 700 23px Rajdhani, sans-serif;
}

.booking-option span {
    display: block;
}

.booking-option small {
    display: block;
    color: var(--mut);
    font-size: 14px;
    line-height: 1.5;
}

.booking-option .booking-option-price {
    color: var(--p);
    font: 700 28px Rajdhani, sans-serif;
    margin-top: 3px;
}

/* ---------- Fields ---------- */

.booking-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.booking-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.booking-field.full {
    grid-column: 1 / -1;
}

.booking-field label {
    font-weight: 500;
    font-size: 14px;
}

.booking-field input {
    min-width: 0;
}

.booking-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    line-height: 1.5;
    font-size: 14px;
}

.booking-checkbox input {
    width: auto;
    margin-top: 4px;
    accent-color: var(--p);
    flex: 0 0 auto;
}

/* ---------- Review ---------- */

.booking-review {
    display: grid;
    grid-template-columns: minmax(90px, 40%) minmax(0, 1fr);
    gap: 0 14px;
}

.booking-review dt,
.booking-review dd {
    padding: 12px 0;
    border-bottom: 1px solid var(--bg);
    overflow-wrap: anywhere;
}

.booking-review dt {
    color: var(--mut);
}

.booking-review dd {
    font-weight: 500;
    margin: 0;
}

.booking-hint {
    margin-top: 22px;
    font-size: 14px;
    color: var(--mut);
}

.booking-hint a {
    color: var(--p);
    text-decoration: underline;
}

/* ---------- Buttons and notices ---------- */

/* Continue always sits on the right; Back (when visible) is pushed to the left */
.booking-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.booking-actions [data-book-back] {
    margin-right: auto;
}

.booking-actions .btn {
    min-width: 140px;
    white-space: nowrap;
}

.booking-actions .btn[hidden] {
    display: none !important;
}

.booking-alert {
    background: rgba(193, 32, 47, .06);
    border: 1px solid rgba(193, 32, 47, .22);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    margin: 0 0 24px;
}

.booking-alert[hidden],
.booking-success[hidden],
.booking-progress[hidden],
#booking-form[hidden] {
    display: none !important;
}

.booking-actions .btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ---------- Confirmation shown after a successful request ---------- */

.booking-success {
    border-left: 4px solid var(--p);
    padding-left: 20px;
    line-height: 1.6;
}

.booking-success:focus {
    outline: none;
}

.booking-success h2 {
    margin: 0 0 12px;
}

.booking-success h3 {
    margin: 22px 0 8px;
}

.booking-success p {
    margin: 0 0 10px;
}

.booking-success ol {
    margin: 0;
    padding-left: 20px;
}

.booking-success li {
    margin-bottom: 6px;
}

.booking-success a {
    color: var(--p);
    text-decoration: underline;
}

/* ---------- Tablet ---------- */

@media (max-width: 900px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-aside {
        position: static;
    }
}

/* ---------- Phone ---------- */

@media (max-width: 600px) {
    .booking-intro {
        padding: 36px 16px 12px;
    }

    .booking-panel {
        scroll-margin-top: 80px;
    }

    .booking-panel,
    .booking-aside {
        padding: 20px;
    }

    .booking-fields {
        grid-template-columns: 1fr;
    }

    .booking-field.full {
        grid-column: auto;
    }

    .booking-progress {
        gap: 6px;
    }

    .booking-progress-item {
        font-size: 13px;
    }

    .booking-actions .btn {
        min-width: 0;
        flex: 1;
        padding: 0 14px;
    }

    .booking-step h2 {
        font-size: 28px;
    }

    .booking-review {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .booking-review dt {
        padding: 12px 0 0;
        border-bottom: 0;
        font-size: 14px;
    }

    .booking-review dd {
        padding: 2px 0 12px;
    }
}

/* ---------- Small phones ---------- */

/* four labels no longer fit in one row, so the steps wrap into two rows of two */
@media (max-width: 480px) {
    .booking-progress {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 8px;
    }
}

@media (max-width: 360px) {
    .booking-actions .btn {
        padding: 0 10px;
        font-size: 17px;
    }
}
