/* =========================================================
   Reservation pages (Online_Reserve) - shared styles
   Uses the CSS variables defined in style.css
   ========================================================= */

/* ========== Page Hero ========== */
.page-hero {
    position: relative;
    padding-block: 120px 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 60%;
    height: 160%;
    background: radial-gradient(circle, rgba(185, 139, 62, .15) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 50%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 255, 255, .08) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 24px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp .8s var(--ease) .2s forwards;
}

.breadcrumb a {
    color: rgba(255, 255, 255, .85);
    transition: color .3s;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.page-hero h1 {
    font-size: clamp(30px, 4.6vw, 50px);
    line-height: 1.3;
    color: #fff;
    margin-bottom: 18px;
    opacity: 0;
    animation: fadeUp .8s var(--ease) .3s forwards;
}

.page-hero h1 span {
    color: var(--accent);
}

.page-hero p.lead {
    font-size: 17.5px;
    color: rgba(255, 255, 255, .84);
    max-width: 680px;
    line-height: 1.9;
    opacity: 0;
    animation: fadeUp .8s var(--ease) .4s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Layout ========== */
.reserve-section {
    background: var(--bg);
}

.reserve-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .8fr);
    gap: 28px;
    align-items: start;
}

/* Grid/flex children default to ``min-width: auto`` which lets the wide
   day scroller stretch the whole page. Keep them shrinkable instead. */
.reserve-grid > *,
.reserve-card,
.reserve-side,
.reserve-card form,
.field {
    min-width: 0;
}

.reserve-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
}

.reserve-card form {
    max-width: 100%;
}

.reserve-side {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ========== Steps ========== */
.steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-faint);
    font-weight: 600;
}

.step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex: none;
}

.step.active {
    color: var(--primary);
}

.step.active .step-num {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.step.done .step-num {
    background: var(--primary-pale);
    border-color: var(--primary-pale);
    color: var(--primary);
}

.step-line {
    flex: 1;
    min-width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--line);
}

/* ========== Forms ========== */
.reserve-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--accent-pale);
    color: #6b4d13;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 13.5px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.reserve-note svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 3px;
}

.form-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field select,
.field input {
    width: 100%;
}

.field input[readonly] {
    background: var(--surface-2);
    color: var(--ink-soft);
    cursor: default;
}

.price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--primary-pale);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.price-box span {
    font-size: 13.5px;
    color: var(--primary);
    font-weight: 600;
}

.price-box b {
    font-size: 18px;
    color: var(--primary);
}

.form-error {
    display: none;
    margin-top: 14px;
    background: #fdecec;
    color: #a12c2c;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
}

/* ========== Alerts / messages ========== */
.alert {
    border-radius: 14px;
    padding: 18px 20px;
    font-size: 14.5px;
    line-height: 1.9;
    margin-bottom: 22px;
    border: 1px solid transparent;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.alert-info,
.alert-success {
    background: var(--primary-pale);
    color: var(--primary);
    border-color: rgba(31, 68, 56, .2);
}

.alert-warning {
    background: var(--accent-pale);
    color: #6b4d13;
    border-color: rgba(185, 139, 62, .3);
}

.alert-error,
.alert-danger {
    background: #fdecec;
    color: #a12c2c;
    border-color: rgba(161, 44, 44, .2);
}

.alert-print {
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    flex: none;
}

.alert-print:hover {
    background: rgba(255, 255, 255, .5);
}

/* ========== Day / time picker ========== */
.days-scroller {
    display: flex;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 14px;
    margin-bottom: 18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.days-scroller::-webkit-scrollbar {
    height: 8px;
}

.days-scroller::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 8px;
}

.day-card {
    min-width: 210px;
    max-width: 230px;
    flex: none;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    scroll-snap-align: start;
}

.day-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
    text-align: center;
}

.day-head b {
    font-size: 14.5px;
    color: var(--primary);
}

.day-head span {
    font-size: 12.5px;
    color: var(--ink-faint);
}

.slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.slot {
    position: relative;
}

.slot input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.slot label {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 8px;
    padding: 7px 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: background .25s, color .25s, border-color .25s;
    cursor: pointer;
}

.slot input:hover + label {
    border-color: var(--primary);
}

.slot input:checked + label {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.slot input:disabled + label {
    text-decoration: line-through;
    opacity: .45;
    cursor: not-allowed;
    background: var(--surface-2);
}

.slot input:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.slots-empty {
    width: 100%;
    background: var(--surface-2);
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
}

/* ========== Side summary ========== */
.side-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.side-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-card h3 svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex: none;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-item span {
    color: var(--ink-faint);
}

.summary-item b {
    color: var(--ink);
    font-weight: 700;
    text-align: left;
}

.side-card p {
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.9;
}

.side-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.side-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13.5px;
}

.side-contact svg {
    width: 16px;
    height: 16px;
    flex: none;
}

/* ========== Final review (alert + check + actions) ========== */
.review-alert {
    align-items: center;
}

.review-alert-text {
    flex: 1 1 260px;
    min-width: 0;
}

.review-alert-text b {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.review-alert-text p {
    font-size: 13px;
    line-height: 1.9;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--ink-soft);
    cursor: pointer;
    transition: border-color .25s, background .25s;
}

.check-row:hover {
    border-color: var(--primary);
}

.check-row input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: none;
    accent-color: var(--primary);
    cursor: pointer;
}

.check-row b {
    color: var(--ink);
}

.check-row:has(input:checked) {
    background: var(--primary-pale);
    border-color: rgba(31, 68, 56, .35);
}

/* ========== Action buttons ========== */
.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.form-actions .btn {
    flex: 1 1 210px;
}

/* ========== Final confirmation dialog ========== */
.confirm-dialog {
    width: min(520px, calc(100% - 32px));
    max-width: 100%;
    max-height: calc(100% - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    overflow: auto;
    box-shadow: 0 30px 80px -20px rgba(10, 24, 20, .45);
}

.confirm-dialog::backdrop {
    background: rgba(10, 24, 20, .55);
    backdrop-filter: blur(3px);
}

.confirm-dialog[open] {
    animation: dialogIn .28s var(--ease);
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.confirm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 22px 0;
}

.confirm-head h3 {
    font-size: 18px;
    color: var(--primary);
}

.confirm-close {
    width: 34px;
    height: 34px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink-soft);
    cursor: pointer;
    transition: background .25s, color .25s;
}

.confirm-close:hover {
    background: var(--primary-pale);
    color: var(--primary);
}

.confirm-body {
    padding: 14px 22px 0;
}

.confirm-lead {
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.9;
    margin-bottom: 16px;
}

.confirm-list {
    background: var(--surface-2);
    border-radius: 14px;
    padding: 14px 16px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    padding: 18px 22px 22px;
}

.confirm-actions .btn {
    flex: 1 1 0;
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
    .breadcrumb,
    .page-hero h1,
    .page-hero p.lead {
        opacity: 1;
        animation: none;
    }
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
    .reserve-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .reserve-side {
        position: static;
    }
}

@media (max-width: 720px) {
    .page-hero {
        padding-block: 100px 60px;
    }

    .reserve-card {
        padding: 22px;
    }

    .form-row2 {
        grid-template-columns: 1fr;
    }

    .step {
        font-size: 12px;
    }

    .step-num {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .day-card {
        min-width: 180px;
        max-width: 200px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .reserve-grid {
        gap: 18px;
    }

    .reserve-card {
        padding: 16px;
        border-radius: 16px;
    }

    .page-hero {
        padding-block: 96px 52px;
    }

    .page-hero h1 {
        font-size: 26px;
    }

    .page-hero p.lead {
        font-size: 14.5px;
    }

    .breadcrumb {
        font-size: 12.5px;
        margin-bottom: 18px;
    }

    .steps {
        gap: 6px;
        margin-bottom: 20px;
    }

    .step {
        gap: 6px;
        font-size: 11.5px;
    }

    .step-line {
        min-width: 10px;
    }

    .reserve-note {
        font-size: 12.5px;
        padding: 12px 14px;
    }

    .day-card {
        min-width: 160px;
        max-width: 180px;
    }

    .slots {
        gap: 6px;
    }

    .slot label {
        padding: 6px 4px;
        font-size: 11.5px;
    }

    /* Keep iOS from zooming the page when a field is focused */
    .field input,
    .field select,
    .field textarea {
        font-size: 16px;
    }

    .alert {
        padding: 14px 16px;
        font-size: 13px;
    }

    .side-card {
        padding: 18px;
    }

    .side-card p {
        font-size: 13px;
    }

    .form-actions {
        gap: 10px;
    }

    .form-actions .btn,
    .confirm-actions .btn {
        flex: 1 1 100%;
    }

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

/* ========== Booking receipt (after registration) ========== */
.receipt-section {
    padding-top: 44px;
}

.receipt-wrap {
    max-width: 760px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.success-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #2E7D5B 0%, #3C9B72 100%);
    box-shadow: 0 16px 34px -14px rgba(46, 125, 91, .55);
    animation: receipt-pop .5s cubic-bezier(.22, 1.4, .5, 1) both;
}

.success-badge svg {
    width: 34px;
    height: 34px;
}

@keyframes receipt-pop {
    from { transform: scale(.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.receipt-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 32px;
    box-shadow: 0 22px 50px -34px rgba(23, 36, 32, .45);
}

.receipt-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 2px dashed var(--line);
}

.receipt-brand {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.receipt-sub {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--ink-faint);
}

.receipt-code {
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 16px;
    background: var(--surface-2);
    flex: none;
}

.receipt-code span {
    display: block;
    font-size: 10.5px;
    color: var(--ink-faint);
}

.receipt-code b {
    display: block;
    margin-top: 3px;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: var(--primary);
    font-weight: 800;
}

.receipt-rows {
    display: flex;
    flex-direction: column;
    padding-top: 6px;
}

.receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-row span {
    color: var(--ink-faint);
}

.receipt-row b {
    color: var(--ink);
    font-weight: 700;
    text-align: left;
}

.receipt-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--accent-pale);
    color: #7A5A17;
    font-size: 13px;
    line-height: 1.9;
}

.receipt-note svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 3px;
}

.receipt-actions {
    width: 100%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.receipt-actions .btn {
    flex: 1 1 190px;
    justify-content: center;
}

@media (max-width: 575.98px) {
    .receipt-card {
        padding: 22px 20px;
    }

    .receipt-head {
        flex-direction: column;
    }

    .receipt-code {
        width: 100%;
    }

    .receipt-row {
        font-size: 13px;
        gap: 10px;
    }

    .receipt-actions .btn {
        flex: 1 1 100%;
    }
}

/* Print: only the receipt itself */
@media print {
    .page-hero,
    .receipt-hero,
    .site-header,
    .site-footer,
    header,
    footer,
    nav,
    .receipt-actions,
    .success-badge,
    .cursor-dot,
    .loader {
        display: none !important;
    }

    html,
    body {
        background: #fff !important;
    }

    .receipt-section {
        padding: 0 !important;
    }

    .receipt-wrap {
        max-width: 100%;
        gap: 0;
    }

    .receipt-card {
        border: 1px solid #999;
        border-radius: 0;
        box-shadow: none;
        padding: 18px 22px;
        page-break-inside: avoid;
    }

    .receipt-code {
        background: #fff;
    }

    .receipt-note {
        background: #fff;
        border: 1px dashed #999;
        color: #333;
    }
}
