.booking-page {
    --booking-primary: var(--primary-color, #9b3f70);
    --booking-primary-dark: #743052;
    --booking-border: #e6dfe3;
    --booking-muted: #6f6670;
    --booking-surface: #fff;
    min-height: 100vh;
    background: #f8f5f7;
    color: #2f2930;
}

.booking-page *,
.booking-page *::before,
.booking-page *::after {
    box-sizing: border-box;
}

.booking-hero {
    background: linear-gradient(135deg, #51243d, var(--booking-primary));
    color: #fff;
    padding: 1.4rem 0 1.7rem;
}

.booking-hero-inner {
    display: grid;
    gap: 1rem;
}

.booking-back {
    width: fit-content;
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
}

.booking-back:hover,
.booking-back:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.booking-stylist {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.booking-stylist img,
.booking-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    object-fit: cover;
}

.booking-avatar {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .16);
    font-size: 1.35rem;
}

.booking-stylist h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.45rem, 4vw, 2.15rem);
}

.booking-stylist p {
    margin: .2rem 0 0;
}

.booking-eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    font-weight: 700;
    opacity: .82;
}

.booking-shell {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

.booking-progress {
    max-width: 720px;
    margin: 0 auto 1.5rem;
}

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

.progress-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: .4rem;
    color: var(--booking-muted);
    text-align: center;
    font-size: .78rem;
}

.progress-step:not(:last-child)::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--booking-border);
}

.progress-step span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 2px solid var(--booking-border);
    border-radius: 50%;
    background: #fff;
    font-weight: 800;
}

.progress-step.is-active,
.progress-step.is-complete {
    color: var(--booking-primary);
}

.progress-step.is-active span,
.progress-step.is-complete span {
    border-color: var(--booking-primary);
    background: var(--booking-primary);
    color: #fff;
}

.progress-step.is-complete:not(:last-child)::before {
    background: var(--booking-primary);
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    gap: 1.5rem;
    align-items: start;
}

.booking-main {
    min-width: 0;
}

.booking-step,
.booking-summary {
    border: 1px solid var(--booking-border);
    border-radius: 16px;
    background: var(--booking-surface);
    box-shadow: 0 10px 35px rgba(67, 39, 55, .07);
}

.booking-step {
    margin-bottom: 1.25rem;
    padding: clamp(1rem, 3vw, 2rem);
    scroll-margin-top: 6rem;
}

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

.step-heading {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1.5rem;
}

.step-heading > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: #f4e8ef;
    color: var(--booking-primary);
    font-weight: 800;
}

.step-heading h2,
.booking-summary h2 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.step-heading p {
    margin: .25rem 0 0;
    color: var(--booking-muted);
}

.service-grid {
    display: grid;
    gap: .8rem;
}

.service-choice {
    position: relative;
    display: block;
    cursor: pointer;
}

.service-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.service-choice-content {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--booking-border);
    border-radius: 12px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.service-choice:hover .service-choice-content,
.service-choice input:focus-visible + .service-choice-content {
    border-color: #c492ad;
}

.service-choice input:focus-visible + .service-choice-content {
    box-shadow: 0 0 0 4px rgba(155, 63, 112, .15);
}

.service-choice.is-selected .service-choice-content {
    border-color: var(--booking-primary);
    background: #fff7fb;
}

.service-choice.is-selected .service-choice-content::before {
    content: '✓';
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 50%;
    background: var(--booking-primary);
    color: #fff;
    font-weight: 800;
}

.service-copy {
    display: grid;
    flex: 1;
    gap: .25rem;
}

.service-copy small,
.service-copy em {
    color: var(--booking-muted);
    font-size: .86rem;
    font-style: normal;
}

.service-price {
    white-space: nowrap;
    color: var(--booking-primary-dark);
    font-size: 1.05rem;
    font-weight: 800;
}

.datetime-grid,
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.booking-page .form-control,
.booking-page .form-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cfc5cb;
    border-radius: 10px;
}

.booking-page textarea.form-control {
    min-height: 125px;
}

.booking-page .form-control:focus,
.booking-page .form-select:focus {
    border-color: var(--booking-primary);
    box-shadow: 0 0 0 4px rgba(155, 63, 112, .14);
}

.form-label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 700;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: .55rem;
    min-height: 94px;
    max-height: 280px;
    overflow-y: auto;
    padding: .75rem;
    border: 1px solid var(--booking-border);
    border-radius: 12px;
    background: #faf8f9;
}

.time-slots-grid > p {
    grid-column: 1 / -1;
    align-self: center;
    margin: 0;
    color: var(--booking-muted);
    text-align: center;
}

.time-slot {
    min-height: 46px;
    border: 2px solid #d7cbd1;
    border-radius: 10px;
    background: #fff;
    color: #3c3339;
    font-weight: 700;
}

.time-slot:hover,
.time-slot:focus-visible,
.time-slot.is-selected {
    border-color: var(--booking-primary);
}

.time-slot:focus-visible {
    outline: 3px solid rgba(155, 63, 112, .2);
}

.time-slot.is-selected {
    background: var(--booking-primary);
    color: #fff;
}

.time-input-fallback {
    margin-top: 1rem;
}

.time-input-fallback.is-enhanced {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.field-error {
    margin-top: .7rem;
    padding: .7rem .85rem;
    border-left: 4px solid #b42318;
    border-radius: 6px;
    background: #fff1f0;
    color: #8f1d15;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--booking-border);
}

.step-actions-end {
    justify-content: flex-end;
}

.step-actions .btn {
    min-height: 48px;
}

.booking-summary {
    position: sticky;
    top: 96px;
    padding: 1.25rem;
}

.summary-stylist {
    display: grid;
    margin: .8rem 0 1rem;
}

.summary-stylist span {
    color: var(--booking-muted);
    font-size: .88rem;
}

.summary-services {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-services li,
.summary-total {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.summary-services li span {
    color: var(--booking-muted);
}

.summary-services li strong {
    white-space: nowrap;
}

.summary-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--booking-border);
    font-size: 1.08rem;
}

.summary-total strong {
    color: var(--booking-primary-dark);
    font-size: 1.2rem;
}

.summary-schedule {
    margin: 1rem 0 0;
    padding: .8rem;
    border-radius: 9px;
    background: #f8f5f7;
    font-weight: 700;
}

.summary-policy {
    margin-top: 1rem;
    color: var(--booking-muted);
    font-size: .83rem;
}

.final-summary {
    padding: 1rem;
    border: 1px solid var(--booking-border);
    border-radius: 12px;
}

.cancellation-notice {
    display: flex;
    gap: .8rem;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 12px;
    background: #f3f7ff;
    color: #263b63;
}

.cancellation-notice p {
    margin: .2rem 0 0;
}

.terms-choice {
    display: flex;
    min-height: 52px;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid var(--booking-border);
    border-radius: 12px;
    cursor: pointer;
}

.terms-choice input {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.mobile-booking-summary {
    display: none;
}

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

    .booking-summary {
        display: none;
    }

    .mobile-booking-summary {
        position: sticky;
        z-index: 20;
        top: 0;
        display: flex;
        min-height: 50px;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .65rem max(1rem, calc((100vw - 720px) / 2));
        border-bottom: 1px solid var(--booking-border);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 5px 18px rgba(67, 39, 55, .08);
        backdrop-filter: blur(8px);
        font-size: .88rem;
    }

    .mobile-booking-summary strong {
        white-space: nowrap;
        color: var(--booking-primary-dark);
    }
}

@media (max-width: 767.98px) {
    .booking-hero {
        padding: 1rem 0 1.2rem;
    }

    .booking-stylist img,
    .booking-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .booking-shell {
        padding: 1rem .75rem 5rem;
    }

    .booking-progress {
        margin-bottom: 1rem;
    }

    .progress-step b {
        font-size: .68rem;
    }

    .booking-step {
        padding: 1rem;
        border-radius: 13px;
    }

    .datetime-grid,
    .details-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-choice-content {
        min-height: 84px;
        padding: .85rem;
    }

    .step-actions {
        position: sticky;
        z-index: 10;
        bottom: 0;
        margin-right: -1rem;
        margin-left: -1rem;
        padding: .8rem 1rem;
        border-top: 1px solid var(--booking-border);
        background: rgba(255, 255, 255, .97);
    }

    .step-actions .btn {
        flex: 1;
        padding-right: .75rem;
        padding-left: .75rem;
    }
}

@media (max-width: 420px) {
    .progress-step span {
        width: 32px;
        height: 32px;
    }

    .progress-step:not(:last-child)::before {
        top: 16px;
    }

    .progress-step b {
        max-width: 62px;
        line-height: 1.15;
    }

    .service-choice-content {
        align-items: flex-start;
        gap: .65rem;
    }

    .service-choice.is-selected .service-choice-content::before {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .service-copy small {
        display: none;
    }

    .step-actions {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .booking-page *,
    .booking-page *::before,
    .booking-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
