/* Booking refinements: retain the restaurant's green, saffron and display
   type; give prices, choices and the next action a consistent reading order. */
body.customer-mode {
    --booking-action: #b34b12;
    --booking-action-hover: #913b0c;
    --booking-paper: #fff;
    --booking-border: #d8e2da;
}
body.customer-mode :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--sf-green);
    outline-offset: 3px;
}
body.customer-mode :is(.btn-orange, .btn-primary, .nav-link-cta, .kitchen-action-primary:first-child),
body.customer-mode #packageCards a.preset-order {
    background: var(--booking-action);
    border-color: var(--booking-action);
    color: #fff;
}
body.customer-mode .nav-links a.nav-link-cta,
body.customer-mode .nav-links a.nav-link-cta.active,
body.customer-mode[data-page="home"] .kitchen-actions .kitchen-action-primary:first-child,
body.customer-mode[data-page="home"] .home-price-order {
    background: var(--booking-action);
    border-color: var(--booking-action);
    color: #fff;
}
body.customer-mode :is(.btn-orange, .btn-primary):hover,
body.customer-mode #packageCards a.preset-order:hover {
    background: var(--booking-action-hover);
    color: #fff;
}
body.customer-mode #packageCards .preset-body {
    text-align: left;
    align-items: flex-start;
    padding: 16px;
}
body.customer-mode #packageCards .preset-name {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 6px;
}
body.customer-mode #packageCards .preset-price { font-size: 23px; justify-content: flex-start; }
body.customer-mode #packageCards :is(.preset-description, .preset-dish-count, .preset-badges) {
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    justify-content: flex-start;
}
body.customer-mode #packageCards :is(.preset-menu-link, .preset-ask-link) { min-height: 44px; }
body.customer-mode #packageCards .preset-menu-link { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
body.customer-mode #packageCards a.preset-order { min-height: 44px; text-transform: none; letter-spacing: 0; }
.preset-photo { position: relative; }
.package-photo-caption {
    position: absolute;
    bottom: 8px;
    left: 8px;
    color: #fff;
    background: #123f28eb;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 10px;
}
.package-essential-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px 24px;
    background: var(--booking-paper);
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--booking-border);
    border-radius: 10px;
}
body.customer-mode .package-essential-filters .package-budget-filters { margin: 0; padding: 0; flex: 1 1 460px; }
body.customer-mode .package-essential-filters .package-filter-group { margin: 0; }
body.customer-mode .package-essential-filters :is(input, .package-chip, button) { min-height: 44px; }
body.customer-mode .package-essential-filters label { font-size: 13px; }
body.customer-mode .pricing-basis { max-width: 85ch; }
body.customer-mode[data-page="order"] .summary-row { font-size: 13px; line-height: 1.5; }
body.customer-mode[data-page="order"] .field-hint { font-size: 12px; line-height: 1.6; }
body.customer-mode[data-page="order"] .order-flow-actions .btn { min-height: 44px; font-size: 13px; }
body.customer-mode[data-page="order"] #summaryTotalHint { display: block; font-size: 11px; font-weight: 400; }
body.customer-mode[data-page="order"] .fixed-menu-help { font-size: 12px; line-height: 1.6; }
.booking-intent {
    padding: 12px 16px;
    margin: 0 0 12px;
    background: #eef5f0;
    border-left: 3px solid var(--sf-green);
    color: var(--sf-green-dark);
    font-size: 13px;
}
.serving-detail { display: block; font-size: 12px; color: var(--sf-muted); font-weight: 400; }
.dish-change-dialog {
    margin: auto;
    width: min(520px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid var(--booking-border);
    border-radius: 16px;
    padding: 24px;
    color: var(--sf-ink);
    box-shadow: 0 24px 80px #123f2833;
}
.dish-change-dialog::backdrop { background: #10291f99; }
body.customer-mode .dish-change-dialog h2 { font-family: var(--sf-serif); font-size: 25px; margin: 0 0 14px; }
.dish-change-dialog p { font-size: 14px; line-height: 1.7; }
.dish-change-prices { margin: 20px 0; }
.dish-change-prices > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--booking-border); }
.dish-change-prices dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dish-change-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.dish-change-actions .btn, body.customer-mode .dish-change-actions .btn { min-height: 44px; }
body.customer-mode #quickContact { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: auto; }
#quickContactToggle { min-height: 44px; padding: 10px 18px; border: 1px solid var(--sf-green); border-radius: 24px; background: #fff; color: var(--sf-green-dark); font-weight: 600; cursor: pointer; }
#quickContactLinks { order: -1; display: flex; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--booking-border); border-radius: 12px; box-shadow: var(--sf-shadow); }
#quickContactLinks[hidden] { display: none; }
body.customer-mode #quickContactLinks .quick-contact-btn { position: static; min-width: 44px; min-height: 44px; }
body.customer-mode[data-page="home"] .kitchen-controls { display: flex; align-items: center; gap: 0; width: 44px; min-width: 44px; flex: 0 0 44px; overflow: visible; padding: 0; }
body.customer-mode[data-page="home"] .kitchen-pause { position: static; width: 44px; height: 44px; border: 1px solid #ffffffa6; border-radius: 50%; background: #123f287a; }
body.customer-mode[data-page="home"] .kitchen-pause::before,
body.customer-mode[data-page="home"] .kitchen-pause::after { content: none; }
@media (max-width: 900px) {
    body.customer-mode { padding-bottom: calc(52px + env(safe-area-inset-bottom)) !important; }
    body.customer-mode #quickContact,
    body.customer-mode[data-page="order"] #quickContact {
        position: fixed;
        inset: auto 0 0 0 !important;
        width: 100%;
        height: calc(48px + env(safe-area-inset-bottom));
        padding: 2px 12px env(safe-area-inset-bottom);
        background: #fff;
        border-top: 1px solid var(--booking-border);
        align-items: flex-end;
        justify-content: center;
        z-index: 80;
    }
    #quickContactToggle { border: 0; border-radius: 6px; font-size: 12px; }
    #quickContactLinks { position: absolute; bottom: calc(100% + 8px); right: 12px; }
    body.customer-mode.has-order-mobile-bar[data-page="order"] { padding-bottom: calc(144px + env(safe-area-inset-bottom)) !important; }
    body.customer-mode[data-page="order"] .order-mobile-bar { bottom: calc(48px + env(safe-area-inset-bottom)) !important; }
    body.customer-mode[data-page="order"] .order-mobile-bar .btn { min-height: 44px; }
    body.customer-mode .back-to-top { bottom: 60px; }
    body.customer-mode[data-page="order"] .back-to-top { display: none; }
    body.customer-mode .brand img { min-width: 72px; object-fit: contain; }
}
@media (max-width: 600px) {
    body.customer-mode[data-page="order"] .order-live-total { display: none; }
    body.customer-mode[data-page="order"] .booking-intent { padding: 8px 12px; font-size: 12px; }
    body.customer-mode[data-page="home"] .kitchen-copy h1 { font-size: clamp(27px, 7.6vw, 32px); }
    .package-essential-filters { padding: 14px; gap: 14px; }
    body.customer-mode .package-essential-filters .package-budget-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex-basis: 100%; }
    .package-essential-filters input { width: 100%; min-width: 0; }
    body.customer-mode .main :is(input.form-control, select.form-control, textarea.form-control, #eventType, #eventPaxCount, #packageGuests, #packageBudget) { font-size: 16px; min-height: 44px; }
    .dish-change-dialog { padding: 20px; }
    .dish-change-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
    body.customer-mode *, body.customer-mode *::before, body.customer-mode *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print { #quickContact, .dish-change-dialog { display: none !important; } }

/* Keep the desktop booking canvas within the screen; long menus scroll inside it. */
@media screen and (min-width: 901px) {
    /* The body used to be pinned to the viewport height with the booking area
       scrolling inside it. Combined with the overflow-x: clip the customer
       pages set, the body became a scroller of its own: the footer was laid
       out at the foot of the viewport while the menu carried on underneath it,
       leaving a blank strip several hundred pixels tall under the footer. The
       page now grows with its content and the footer follows it. */
    body.customer-mode[data-page="order"] { height: auto; min-height: 100dvh; }
    body.customer-mode[data-page="order"] .portal-wrap { flex: 1 1 auto; min-height: 0; overflow: visible; }
    body.customer-mode[data-page="order"] .portal-wrap .main { padding-top: 4px; padding-bottom: 0; }
    body.customer-mode[data-page="order"] .order-summary-box { top: 4px !important; }
    body.customer-mode[data-page="order"] #quickContact { bottom: 72px; }
    body.customer-mode[data-page="order"] .app-footer { flex-shrink: 0; margin-top: 0; padding: 6px 24px !important; }
    body.customer-mode[data-page="order"] .footer-content > div:first-child { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    body.customer-mode[data-page="order"] .footer-logo,
    body.customer-mode[data-page="order"] .footer-copy,
    body.customer-mode[data-page="order"] .footer-staff-login { margin: 0; }
    body.customer-mode[data-page="order"] .footer-contact { font-size: 11px; }
}
