/* ═══════════════════════════════════════════════════════════
   BOOKING — Wireframe Prototype
   Functional layout only. Final design TBD.
   ═══════════════════════════════════════════════════════════ */

.hidden {
    display: none !important;
}

:root {
    --wf-text:    #222;
    --wf-muted:   #777;
    --wf-border:  #bbb;
    --wf-bg:      #f4f2ee;
    --wf-surface: #fff;
    --wf-accent:  #864;
    --wf-radius:  3px;
    --wf-font:    -apple-system, 'Segoe UI', system-ui, sans-serif;
}

/* ── Page shell ───────────────────────────────────────────── */
#booking {
    background: var(--wf-bg);
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem 4rem;
    font-family: var(--wf-font);
    color: var(--wf-text);
    font-size: 14px;
}

.booking-container {
    max-width: 1040px;
    margin: 0 auto;
}

/* ── Step 1 — Service cards ───────────────────────────────── */
.booking-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.booking-title {
    font-family: var(--wf-font);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wf-text);
    margin: 0 0 .35rem;
}

.booking-subtitle {
    font-size: .9rem;
    color: var(--wf-muted);
    margin: 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
}

.service-card {
    background: var(--wf-surface);
    border: 1px dashed var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 1.25rem 1rem;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    color: var(--wf-text);
    font-family: var(--wf-font);
}

.service-card:hover {
    border-style: solid;
    border-color: var(--wf-accent);
}

.service-card.active {
    border-style: solid;
    border-color: var(--wf-accent);
    background: #eee;
}

.service-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    border-radius: 50%;
    color: var(--wf-muted);
}

.service-card:hover .service-icon,
.service-card.active .service-icon {
    background: #ddd;
}

.service-icon svg {
    width: 20px;
    height: 20px;
}

.service-name {
    font-size: .85rem;
    font-weight: 600;
}

.service-desc {
    font-size: .75rem;
    color: var(--wf-muted);
}

/* ── Step 2 — Calendar layout ─────────────────────────────── */
.calendar-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

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

/* ── Calendar panel ───────────────────────────────────────── */
.calendar-panel {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 1.25rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.cal-month-title {
    font-family: var(--wf-font);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--wf-text);
    margin: 0;
}

.cal-nav-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--wf-border);
    background: var(--wf-surface);
    border-radius: var(--wf-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wf-muted);
}

.cal-nav-btn:hover {
    border-color: var(--wf-accent);
    color: var(--wf-text);
}

.cal-nav-btn svg {
    width: 16px;
    height: 16px;
}

/* 7-column grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-grid.cal-loading {
    opacity: .4;
    pointer-events: none;
}

.cal-dow {
    font-size: .7rem;
    font-weight: 600;
    color: var(--wf-muted);
    text-align: center;
    padding: .25rem 0 .5rem;
    text-transform: uppercase;
}

.cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--wf-radius);
    font-size: .95rem;
    color: var(--wf-muted);
    gap: 2px;
}

.cal-empty {
    pointer-events: none;
}
.cal-past {
    opacity: .3;
    pointer-events: none;
}

.cal-day-num {
    line-height: 1;
    font-weight: 400;
}

.cal-slot-count {
    font-size: .65rem;
    color: var(--wf-accent);
    font-weight: 600;
    white-space: nowrap;
}

.cal-available {
    cursor: pointer;
    color: var(--wf-text);
}

.cal-available:hover {
    background: #eee;
}

/* Today — underline */
.cal-today .cal-day-num {
    text-decoration: underline;
}

/* Selected day */
.cal-selected {
    background: var(--wf-accent) !important;
}

.cal-selected .cal-day-num {
    color: #fff;
    font-weight: 600;
}

.cal-selected .cal-slot-count {
    color: rgba(255,255,255,.7);
}

.cal-selected.cal-today .cal-day-num {
    text-decoration: underline;
}

/* ── Slots panel ──────────────────────────────────────────── */
.slots-panel {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 1rem;
    min-height: 240px;
}

.slots-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--wf-muted);
    text-align: center;
    gap: .5rem;
}

.placeholder-icon {
    width: 40px;
    height: 40px;
    opacity: .3;
    color: var(--wf-text);
}

.placeholder-icon svg {
    width: 100%;
    height: 100%;
}

.slots-placeholder p {
    font-size: .8rem;
    line-height: 1.5;
    margin: 0;
}

.slots-date {
    font-family: var(--wf-font);
    font-size: .95rem;
    font-weight: 600;
    color: var(--wf-text);
    margin: 0 0 .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--wf-border);
}

.slots-list {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

/* Slot cards — no animation */
.slot-card {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    background: var(--wf-surface);
    cursor: pointer;
    font-family: var(--wf-font);
    color: var(--wf-text);
    text-align: left;
    width: 100%;
}

.slot-card:hover {
    border-color: var(--wf-accent);
    background: #f0f0f0;
}

.slot-time {
    font-size: .85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.slot-sep {
    color: var(--wf-muted);
    font-size: .75rem;
}

.slot-providers {
    margin-left: auto;
    font-size: .7rem;
    color: var(--wf-muted);
    white-space: nowrap;
}

/* ── Shared back button ────────────────────────────────────── */
.btn-back {
    display: inline-block;
    margin-top: 1rem;
    background: none;
    border: none;
    color: var(--wf-muted);
    cursor: pointer;
    font-size: .8rem;
    font-family: var(--wf-font);
    padding: 0;
}

.btn-back:hover {
    color: var(--wf-text);
}

/* ── Step 3 — Provider cards ──────────────────────────────── */
.step-title {
    font-family: var(--wf-font);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--wf-text);
    margin: 0 0 1rem;
}

.providers-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.provider-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    background: var(--wf-surface);
}

.provider-card:hover {
    border-color: var(--wf-accent);
}
.provider-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.provider-card .info {
    flex: 1;
}
.provider-card .info strong {
    display: block;
    margin-bottom: .15rem;
    font-weight: 600;
    font-size: .85rem;
}
.provider-card .bio-preview {
    color: var(--wf-muted);
    font-size: .8rem;
    line-height: 1.4;
}
.provider-card .actions {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex-shrink: 0;
}

.btn-book {
    padding: .4rem 1rem;
    background: var(--wf-accent);
    color: #fff;
    border: none;
    border-radius: var(--wf-radius);
    cursor: pointer;
    font-family: var(--wf-font);
    font-size: .8rem;
    font-weight: 600;
}

.btn-book:hover {
    background: #333;
}

.btn-profile {
    padding: .4rem 1rem;
    background: none;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    cursor: pointer;
    font-family: var(--wf-font);
    font-size: .8rem;
    color: var(--wf-text);
}

.btn-profile:hover {
    border-color: var(--wf-accent);
}

/* ── Step 4 — Confirm form ────────────────────────────────── */
.confirm-summary {
    font-size: .85rem;
    color: var(--wf-muted);
    margin-bottom: 1.25rem;
    padding: .75rem;
    background: #eee;
    border-radius: var(--wf-radius);
    border-left: 3px solid var(--wf-accent);
}

.confirm-form {
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.form-field label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--wf-muted);
    text-transform: uppercase;
}

.form-field input {
    padding: .5rem .6rem;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    font-family: var(--wf-font);
    font-size: .85rem;
    color: var(--wf-text);
    background: var(--wf-surface);
    outline: none;
}

.form-field input:focus {
    border-color: var(--wf-accent);
}

.confirm-error {
    font-size: .8rem;
    color: #c00;
    padding: .5rem .6rem;
    background: #fee;
    border-radius: var(--wf-radius);
    border: 1px solid #fcc;
}

.btn-submit {
    align-self: flex-start;
    padding: .5rem 1.5rem;
    background: var(--wf-accent);
    color: #fff;
    border: none;
    border-radius: var(--wf-radius);
    cursor: pointer;
    font-family: var(--wf-font);
    font-size: .85rem;
    font-weight: 600;
}

.btn-submit:hover {
    background: #333;
}
.btn-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-inner {
    background: var(--wf-surface);
    padding: 1.5rem;
    border-radius: var(--wf-radius);
    border: 1px solid var(--wf-border);
    max-width: 420px;
    width: 90%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-inner h3 {
    font-family: var(--wf-font);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 .75rem;
}

.modal-inner img {
    max-width: 80px;
    border-radius: 50%;
    display: block;
    margin: 0 auto .75rem;
}

.modal-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--wf-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--wf-text);
}

/* ── Cancelled booking banner ─────────────────────── */
.cancelled-banner {
    background: #ffe;
    border: 1px solid #cc0;
    color: #660;
    padding: .5rem 1rem;
    border-radius: var(--wf-radius);
    margin-bottom: 1rem;
    font-size: .8rem;
}

/* ── Thank-you step ────────────────────────────────────────── */
.thankyou-box {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.thankyou-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wf-accent);
    color: #fff;
    font-size: 1.4rem;
    line-height: 48px;
    margin: 0 auto 1rem;
}

.thankyou-text {
    color: var(--wf-muted);
    font-size: .85rem;
    max-width: 360px;
    margin: .5rem auto 0;
    line-height: 1.5;
}

/* ── Start-time list ─────────────────────────────────────────── */
.slot-hour-row {
    display: flex;
    gap: .3rem;
}

.start-time-btn {
    display: inline-block;
    padding: .4rem 1rem;
    flex: 1;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    font-size: .85rem;
    cursor: pointer;
}

.start-time-btn:hover {
    background: #eee;
    border-color: var(--wf-accent);
}

/* ── Stepper ───────────────────────────────────────────────── */
.slots-stepper {
    padding: 1rem 0 .5rem;
}

.stepper-time {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .75rem;
    color: var(--wf-text);
}

.stepper-controls {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.stepper-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--wf-border);
    border-radius: 50%;
    background: var(--wf-surface);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.stepper-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.stepper-btn:not(:disabled):hover {
    background: #eee;
}

.stepper-duration {
    font-size: .9rem;
    min-width: 5rem;
    text-align: center;
}

.stepper-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--wf-text);
    margin-bottom: 1rem;
}

.btn-proceed {
    display: block;
    width: 100%;
    padding: .6rem 1rem;
    background: var(--wf-accent);
    color: #fff;
    border: none;
    border-radius: var(--wf-radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: .5rem;
}

.btn-proceed:hover {
    background: #333;
}
