﻿/* ============================================================
   KITCHEN LAB MALTA — booking.css
   ============================================================ */

.booking-page {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 48px) var(--gutter) 120px;
}

.booking-header {
    margin-bottom: 56px;
}

    .booking-header h1 {
        font-family: var(--f-serif);
        font-size: clamp(44px,5.5vw,80px);
        font-weight: 300;
        line-height: 0.95;
        letter-spacing: -0.025em;
        margin-bottom: 20px;
        margin-top: 16px;
    }

        .booking-header h1 em {
            font-style: italic;
            color: var(--c-red);
        }

    .booking-header p {
        font-size: 14px;
        color: var(--c-text-muted);
        max-width: 480px;
        line-height: 1.85;
    }

/* ── Calendly embed ────────────────────────────────────────── */
.booking-layout > * {
    min-width: 0; /* let grid items shrink below content size */
}

#calendly-embed {
    width: 100%;
    height: 100dvh;
}

/* ── Steps ─────────────────────────────────────────────────── */
.booking-steps {
    display: flex;
    align-items: center;
    margin-bottom: 52px;
}

.booking-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--c-text-muted);
    transition: all 0.3s;
    flex-shrink: 0;
}

.step-label {
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    transition: color 0.3s;
    white-space: nowrap;
}

.booking-step.active .step-num {
    background: var(--c-red);
    border-color: var(--c-red);
    color: #fff;
}

.booking-step.active .step-label {
    color: var(--c-text);
}

.booking-step.completed .step-num {
    border-color: var(--border-mid);
    color: var(--c-red);
}

.step-connector {
    width: 48px;
    height: 1px;
    background: var(--border);
    margin: 0 16px;
    flex-shrink: 0;
}

/* ── Layout ────────────────────────────────────────────────── */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 52px;
    align-items: flex-start;
}

/* ── Panels ────────────────────────────────────────────────── */
.booking-panel {
    display: none;
}

    .booking-panel.active {
        display: block;
        animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
    }

/* ── Calendar ──────────────────────────────────────────────── */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cal-month {
    font-family: var(--f-serif);
    font-size: 22px;
    font-weight: 300;
    color: var(--c-text);
}

.cal-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: none;
    color: var(--c-text-muted);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

    .cal-arrow:hover:not(:disabled) {
        border-color: var(--border-mid);
        color: var(--c-text);
    }

    .cal-arrow:disabled {
        opacity: 0.22;
        cursor: default;
    }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 3px;
}

.cal-dow {
    text-align: center;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    padding-bottom: 14px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 400;
    color: var(--c-text);
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: all 0.2s;
    position: relative;
}
/* Dark mode — available days fully white */
:root .cal-day {
    color: rgba(255,255,255,0.88);
}
/* Light mode — available days fully dark */
[data-theme="light"] .cal-day {
    color: rgba(26,14,5,0.85);
}

.cal-day:hover:not(.disabled):not(.past):not(.weekend) {
    border-color: var(--border-mid);
    background: var(--c-surface-hover);
}

.cal-day.selected {
    background: var(--c-red);
    color: #fff !important;
    border-color: var(--c-red);
}

.cal-day.today {
    border-color: var(--border-mid);
}

    .cal-day.today::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: var(--c-red);
    }

    .cal-day.today.selected::after {
        background: rgba(255,255,255,0.7);
    }
/* Past dates — dimmed but still readable */
.cal-day.past {
    color: rgba(255,255,255,0.2) !important;
    cursor: default;
    pointer-events: none;
}

[data-theme="light"] .cal-day.past {
    color: rgba(26,14,5,0.18) !important;
}
/* Weekends — slightly dimmed */
.cal-day.weekend {
    color: rgba(255,255,255,0.22) !important;
    cursor: default;
    pointer-events: none;
}

[data-theme="light"] .cal-day.weekend {
    color: rgba(26,14,5,0.2) !important;
}

.cal-day.empty {
    pointer-events: none;
}

/* ── Time slots ────────────────────────────────────────────── */
.slots-date-label {
    font-family: var(--f-serif);
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 28px;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
}

.slot-btn {
    padding: 20px 10px;
    border: 1px solid var(--border);
    background: none;
    color: var(--c-text);
    font-family: var(--f-sans);
    font-size: 15px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.22s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.slot-end {
    font-size: 11px;
    color: var(--c-text-muted);
}

.slot-dur {
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-red);
    margin-top: 2px;
}

.slot-btn:hover:not(.booked) {
    border-color: var(--border-strong);
    background: var(--c-surface-hover);
}

.slot-btn.selected {
    background: var(--c-red);
    border-color: var(--c-red);
    color: #fff;
}

    .slot-btn.selected .slot-end {
        color: rgba(255,255,255,0.6);
    }

    .slot-btn.selected .slot-dur {
        color: rgba(255,255,255,0.7);
    }

.slot-btn.booked {
    opacity: 0.22;
    cursor: not-allowed;
    pointer-events: none;
}

    .slot-btn.booked::after {
        content: 'Booked';
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9px;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: var(--c-text-muted);
        background: var(--c-bg);
        opacity: 0.92;
    }

/* ── Detail form ───────────────────────────────────────────── */
.appt-summary {
    border: 1px solid var(--border);
    background: var(--c-bg-mid);
    padding: 20px 22px;
    margin-bottom: 36px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.appt-icon {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-red);
    font-size: 16px;
    flex-shrink: 0;
}

.appt-date {
    font-size: 14px;
    color: var(--c-text);
    font-weight: 400;
}

.appt-time {
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 3px;
}

.appt-dur {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-red);
    margin-top: 3px;
}

.bf-group {
    margin-bottom: 28px;
}

    .bf-group label {
        display: block;
        font-size: 9.5px;
        font-weight: 400;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--c-text-muted);
        margin-bottom: 10px;
    }

    .bf-group input, .bf-group select, .bf-group textarea {
        width: 100%;
        background: transparent;
        border: none;
        border-bottom: 1px solid var(--border);
        color: var(--c-text);
        font-family: var(--f-sans);
        font-size: 14px;
        font-weight: 300;
        padding: 10px 0;
        outline: none;
        transition: border-color 0.3s;
        -webkit-appearance: none;
        appearance: none;
    }

        .bf-group input:focus, .bf-group select:focus {
            border-bottom-color: var(--c-red);
        }

        .bf-group input::placeholder {
            color: var(--c-text-dimmer);
        }

        .bf-group select option {
            background: var(--c-bg-mid);
            color: var(--c-text);
        }

.bf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.booking-sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}

.binfo-card {
    border: 1px solid var(--border);
    padding: 28px 24px;
    margin-bottom: 14px;
}

.binfo-title {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-bottom: 20px;
}

.binfo-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

    .binfo-item:last-child {
        margin-bottom: 0;
    }

.binfo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-red);
    font-size: 13px;
}

.binfo-label {
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-bottom: 4px;
}

.binfo-value {
    font-size: 13px;
    color: var(--c-text);
    line-height: 1.5;
}

.binfo-note {
    font-size: 12px;
    color: var(--c-text-muted);
    line-height: 1.8;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-top: 2px solid var(--c-red);
}

/* ── Nav buttons ───────────────────────────────────────────── */
.booking-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 40px;
}

.btn-back {
    background: none;
    border: 1px solid var(--border);
    color: var(--c-text-muted);
    font-family: var(--f-sans);
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 28px;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-back:hover {
        border-color: var(--border-mid);
        color: var(--c-text);
    }

.btn-confirm {
    background: var(--c-red);
    color: #fff;
    border: none;
    font-family: var(--f-sans);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 44px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

    .btn-confirm:hover:not(:disabled) {
        background: var(--c-red-dark);
        transform: translateY(-2px);
    }

    .btn-confirm:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

/* ── Confirmation overlay ──────────────────────────────────── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(14,6,2,0.97);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    .confirm-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.confirm-box {
    max-width: 560px;
    width: 92%;
    text-align: center;
    padding: 0 24px;
}

.confirm-overlay.active .confirm-box {
    animation: fadeUp 0.55s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.confirm-check {
    width: 68px;
    height: 68px;
    border: 1px solid rgba(232,57,28,0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    color: var(--c-red);
    font-size: 26px;
}

.confirm-box h2 {
    font-family: var(--f-serif);
    font-size: clamp(38px,5vw,60px);
    font-weight: 300;
    line-height: 1;
    color: #fff;
    margin-bottom: 16px;
}

    .confirm-box h2 em {
        font-style: italic;
        color: var(--c-red);
    }

.confirm-name {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
}

.confirm-detail {
    font-size: 13px;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}

.confirm-ref {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-red);
    margin-bottom: 44px;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-cal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    font-family: var(--f-sans);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

.btn-cal-google {
    background: #fff;
    color: #1a1009;
    border: 1px solid #fff;
}

    .btn-cal-google:hover {
        background: #f5f0e8;
    }

.btn-cal-ics {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.18);
}

    .btn-cal-ics:hover {
        border-color: rgba(255,255,255,0.4);
        color: #fff;
    }

.btn-done {
    background: none;
    border: none;
    font-family: var(--f-sans);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    cursor: pointer;
    padding: 10px;
    margin-top: 6px;
    transition: color 0.3s;
}

    .btn-done:hover {
        color: rgba(255,255,255,0.55);
    }

/* ── Responsive ────────────────────────────────────────────── */
@media (min-width: 1101px) {
    .booking-sidebar {
        margin-top: 70px;
    }

}
@media (max-width: 1024px) {
    .booking-layout {
        grid-template-columns: 1fr 260px;
        gap: 36px;
    }
}

@media (max-width: 767px) {
    .booking-page {
        padding: calc(72px + 36px) var(--gutter) 80px;
    }

    .booking-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Run the scheduler edge to edge on phones, ignoring the page gutters */
    #calendly-embed {
        width: calc(100% + (var(--gutter) * 2));
        margin-left: calc(var(--gutter) * -1);
        height: 90dvh;
    }

    .booking-sidebar {
        position: static; /* sticky makes no sense in a single column */
        order: -1;
        margin-bottom: 70px;
    }

    .slots-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .bf-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .step-label {
        display: none;
    }

    .step-connector {
        width: 24px;
        margin: 0 8px;
    }

    .confirm-actions .btn-cal {
        width: 100%;
        justify-content: center;
    }

    /* Visit info: items side by side, wrapping onto new rows as needed */
    .binfo-card {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 28px 32px; /* row gap, column gap */
    }

    .binfo-title {
        grid-column: 1 / -1; /* title spans the full width on its own row */
        margin-bottom: 0; /* the grid gap handles the spacing now */
    }

    .binfo-item {
        margin-bottom: 0; /* same: spacing comes from the grid gap */
    }
}

@media (max-width: 650px) {
    #calendly-embed {
        height: 80dvh;
    }
}