/* Booking step and customer booking page */
#step-booking .slide-inner {
    display: block;
}

.booking-slide {
    max-width: 1100px;
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    margin-top: 1.5rem;
}

.booking-summary {
    position: sticky;
    top: 0.5rem;
    padding: 1.2rem 1.2rem 1.4rem;
    background: var(--blue);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(21, 52, 71, 0.35);
}

.booking-summary h3 {
    margin: 0 0 0.8rem;
    color: var(--white);
    font: 800 0.8rem/1 var(--sans);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.booking-summary .selection-summary {
    padding: 0;
    gap: 0.9rem;
    background: transparent;
    text-shadow: none;
}

.booking-summary .selection-summary dd {
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(21, 52, 71, 0.35);
}

.booking-summary select {
    min-height: 40px;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--navy);
    background: var(--white);
    color: var(--navy);
    font: 600 1rem var(--sans);
    text-shadow: none;
}

.booking-total dd {
    color: var(--white);
    font-size: 1.6rem;
}

.booking-form fieldset {
    margin: 0 0 1.6rem;
    padding: 0 0 1.2rem;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.booking-form legend {
    padding: 0;
    margin-bottom: 0.8rem;
    color: var(--navy);
    font: 400 1.5rem/1.2 var(--serif);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.2rem;
}

.field {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.field-label {
    color: var(--charcoal);
    font: 600 0.82rem/1.3 var(--sans);
}

.field-optional {
    color: var(--muted);
    font-weight: 400;
}

.field input,
.field textarea,
.field select,
.assist-fields select {
    width: 100%;
    min-height: 46px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--muted);
    background: var(--white);
    color: var(--charcoal);
    font: 400 1rem/1.4 var(--sans);
}

.field textarea {
    resize: vertical;
}

.field [aria-invalid="true"] {
    border-color: var(--danger);
}

.field-error,
.booking-error {
    color: var(--danger);
    font: 600 0.8rem/1.4 var(--sans);
}

.field-error:empty {
    display: none;
}

.booking-error {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--danger);
    background: var(--danger-tint);
}

.option-list {
    display: grid;
    gap: 0.7rem;
}

.option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: start;
    padding: 0.85rem 1rem;
    border: 1px solid var(--muted);
    background: var(--white);
    cursor: pointer;
}

.option:has(input:checked) {
    border-color: var(--navy);
    box-shadow: inset 0 0 0 1px var(--navy);
}

.option input {
    margin-top: 0.25rem;
    width: 1.1rem;
    height: 1.1rem;
}

.option-body {
    display: grid;
    gap: 0.2rem;
}

.option-body small {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.assist-fields {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.consent {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    margin: 0.5rem 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.consent input {
    margin-top: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.booking-submit {
    margin-top: 1rem;
    min-height: 52px;
}

.booking-submit[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Customer booking page */
.booking-body {
    background: var(--ivory);
    color: var(--charcoal);
    font-family: var(--sans);
}

.booking-header {
    width: 100%;
    margin: 0 0 1.2rem;
    padding: 0.6rem max(1rem, calc((100% - 900px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--blue);
}

.booking-header .brand-logo {
    height: 56px;
}

.booking-page {
    width: min(100% - 2rem, 900px);
    margin: 0 auto;
    padding-bottom: 3rem;
    display: grid;
    gap: 1.2rem;
}

.booking-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.booking-card {
    min-width: 0;
}

.booking-table {
    width: 100%;
    border-collapse: collapse;
}

.booking-table th,
.booking-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.booking-table th {
    color: var(--navy);
}

.dist-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.dist-totals strong {
    display: block;
    color: var(--navy);
    font-size: 1.8rem;
}

.booking-card {
    padding: clamp(1.2rem, 3vw, 2rem);
    background: var(--white);
    border: 1px solid var(--line);
}

.booking-card h1,
.booking-card h2 {
    margin: 0 0 0.8rem;
    color: var(--navy);
    font: 400 clamp(1.6rem, 4vw, 2.4rem)/1.1 var(--serif);
}

.booking-card .selection-summary {
    margin-top: 0.5rem;
}

.booking-inline-form {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    max-width: 520px;
}

.pay-choice {
    margin: 1.2rem 0;
}

.pay-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.pay-choice-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 1.1rem;
    border: 1px solid var(--line, #d9d3c6);
    border-radius: 6px;
    background: #fff;
}

.pay-choice-card h4,
.pay-choice-card p {
    margin: 0;
}

.pay-choice-card .button {
    margin-top: auto;
}

.booking-assist {
    margin-top: 1.2rem;
}

.booking-assist summary {
    cursor: pointer;
    color: var(--navy);
    font-weight: 600;
}

.booking-notice {
    padding: 0.8rem 1rem;
    border: 1px solid var(--navy);
    background: var(--blue-tint);
    font-weight: 600;
}

.booking-notice.is-error {
    border-color: var(--danger);
    background: var(--danger-tint);
    color: var(--danger);
}

.status-pill {
    display: inline-block;
    margin: 0 0 0.6rem;
    padding: 0.35rem 0.8rem;
    background: var(--navy);
    color: var(--white);
    font: 700 0.75rem/1 var(--sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.status-confirmed,
.art-approved {
    background: var(--green);
    color: var(--navy);
}

.status-expired,
.status-cancelled,
.status-refunded {
    background: var(--muted);
}

.art-changes_requested {
    background: var(--danger);
}

@media (max-width: 860px) {
    .booking-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .booking-summary {
        position: static;
    }

    .field-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.booking-stepper {
    margin: 0 0 1.2rem;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    list-style: none;
    counter-reset: bstep;
}

.booking-stepper li {
    flex: 1;
    padding: 0.55rem 0.7rem;
    border-bottom: 3px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    counter-increment: bstep;
}

.booking-stepper li::before {
    content: counter(bstep) ". ";
}

.booking-stepper li.is-current {
    border-bottom-color: var(--blue);
    color: var(--navy);
}

.booking-stepper li.is-done {
    border-bottom-color: var(--green);
    color: var(--navy);
}

.booking-nav {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: space-between;
}

.booking-nav .button-secondary {
    border: 1px solid var(--navy);
    background: var(--white);
    color: var(--navy);
}

.booking-review {
    margin: 1rem 0;
    border: 1px solid var(--line);
    background: var(--white);
}

.booking-review div {
    padding: 0.6rem 0.9rem;
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 0.8rem;
    border-bottom: 1px solid var(--line);
}

.booking-review dt {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.booking-review dd {
    margin: 0;
    color: var(--navy);
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.booking-proforma-note {
    padding: 0.7rem 0.9rem;
    border-left: 4px solid var(--gold);
    background: var(--gold-tint);
}

@media (max-width: 520px) {
    .booking-review div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
    }
}

/* Terms & Conditions Modal */
.terms-modal {
    width: min(95vw, 800px);
    max-height: 90vh;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 10px 40px rgba(21, 52, 71, 0.2);
}

.terms-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.terms-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--blue-tint);
}

.terms-modal-header h2 {
    margin: 0;
    color: var(--navy);
    font: 400 1.4rem/1.2 var(--serif);
}

.terms-modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--navy);
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s ease;
}

.terms-modal-close:hover,
.terms-modal-close:focus {
    color: var(--blue);
    outline: 2px solid var(--blue);
    outline-offset: -2px;
}

.terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    color: var(--charcoal);
    font: 1rem/1.6 var(--sans);
}

.terms-modal-body h3 {
    margin: 1.5rem 0 0.7rem;
    color: var(--navy);
    font: 600 1.1rem/1.3 var(--sans);
}

.terms-modal-body strong {
    color: var(--navy);
    font-weight: 600;
}

.terms-modal-body p {
    margin: 0.7rem 0;
}

.terms-modal-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--line);
    background: var(--ivory);
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.terms-modal-footer .button {
    min-height: 44px;
}

/* Terms acceptance section */
.terms-acceptance {
    padding: 1rem;
    background: var(--blue-tint);
    border: 1px solid var(--blue);
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.terms-link-container {
    margin: 0 0 0.8rem;
}

.terms-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.terms-link:hover,
.terms-link:focus {
    color: var(--navy);
    text-decoration: none;
}

.consent {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    color: var(--charcoal);
    font: 0.95rem/1.4 var(--sans);
}

.consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.consent span {
    cursor: pointer;
    flex-grow: 1;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .terms-modal {
        width: min(100vw, 95vw);
        max-height: 95vh;
    }

    .terms-modal-header {
        padding: 1rem;
    }

    .terms-modal-header h2 {
        font-size: 1.2rem;
    }

    .terms-modal-body {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .terms-modal-footer {
        padding: 1rem;
    }

    .consent {
        font-size: 0.9rem;
    }
}
