/* Booking flows (團餐 / 真空雞扒) — shared components.
 *
 * These screens are separate from same-day ordering: nothing here touches the
 * cart. Brand tokens come from index.html :root. Sticky bars reuse the
 * .checkout-footer class on purpose: showToast and updateFloatingWA already
 * avoid any on-screen .checkout-footer, so toasts and the WhatsApp bubble stay
 * clear of these bars with no extra code.
 */

.bk-serif { font-family: var(--font-serif); }

/* ---------- Home: booking strip (A2) ---------- */
.bk-strip { padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.bk-strip-head { display: flex; align-items: baseline; gap: 8px; padding: 0 20px 10px; }
.bk-strip-head svg { width: 20px; height: 20px; align-self: center; color: var(--brand); flex-shrink: 0; }
.bk-strip-title { font-family: var(--font-serif); font-size: 20px; font-weight: 900; letter-spacing: .5px; line-height: 1.25; color: var(--ink); }
.bk-strip-note { font-size: 12px; color: var(--text-sub); }
/* Both entries side by side, fully visible — no sideways scrolling. */
.bk-strip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 20px 4px; }

.bk-entry { min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--sh-card); cursor: pointer; text-align: left; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.bk-entry:active { transform: scale(0.98); }
.bk-entry-body { flex: 1; min-width: 0; }
.bk-entry-title { font-size: 17px; font-weight: 900; color: var(--text-main); }
.bk-entry-sub { font-size: 13px; color: var(--text-sub); margin-top: 2px; line-height: 1.4; }
.bk-chevron { display: none; }

/* Serif character tile — the app's no-emoji "招牌字" placeholder */
.bk-tile { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 900; background: #e2e9d2; color: #3f4a2b; }
.bk-tile.is-brown { background: #ece4d4; color: #4a3b26; }
.bk-tile.is-solid { background: var(--primary-green); color: #fff; }
.bk-tile.is-sm { width: 48px; height: 48px; font-size: 24px; border-radius: 12px; }

/* ---------- Booking screens ---------- */
.bk-screen { padding: 0 0 230px; background: var(--paper-bg); min-height: 100vh; }
.bk-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.bk-back { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--panel); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.bk-back svg { width: 22px; height: 22px; }
.bk-title { font-family: var(--font-serif); font-size: 24px; font-weight: 900; color: var(--ink); line-height: 1.25; margin: 0; }
.bk-subtitle { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.bk-body { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }

.bk-card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-card); }
.bk-card-title { font-family: var(--font-serif); font-size: 20px; font-weight: 900; letter-spacing: .5px; line-height: 1.25; color: var(--ink); margin: 0 0 6px; }
.bk-card-text { font-size: 14px; line-height: 1.7; color: var(--text-sub); margin: 0; }

.bk-photo { margin: 0; position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.bk-photo img { display: block; width: 100%; height: 190px; object-fit: cover; }
.bk-photo figcaption { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: #fff; background: rgba(0, 0, 0, 0.45); padding: 3px 8px; border-radius: var(--r-sm); }

.bk-notice { background: var(--panel); border-radius: var(--r-lg); padding: 16px 18px; }
.bk-notice-title { font-family: var(--font-serif); font-size: 20px; font-weight: 900; letter-spacing: .5px; line-height: 1.25; color: var(--ink); margin: 0 0 6px; }
.bk-notice-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-main); }
.bk-notice-row:last-child { border-bottom: none; }
.bk-notice-row strong { color: var(--price-red); font-weight: 800; white-space: nowrap; }

.bk-info { display: flex; gap: 12px; align-items: center; background: var(--brand-tint-2); border: 1px solid #cfdab8; border-radius: var(--r-lg); padding: 14px 16px; }
.bk-info svg { width: 30px; height: 30px; color: var(--primary-green); flex-shrink: 0; }
.bk-info-main { font-size: 15px; font-weight: 800; color: var(--text-main); }
.bk-info-sub { font-size: 13px; color: var(--text-sub); margin-top: 2px; }

.bk-section-title { font-family: var(--font-serif); font-size: 20px; font-weight: 900; letter-spacing: .5px; line-height: 1.25; color: var(--ink); margin: 6px 4px -4px; }
.bk-section-title small { font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.bk-hint { font-size: 13px; color: var(--text-sub); margin: -6px 4px 0; }

/* Item row with stepper */
.bk-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r-lg); padding: 12px 14px; box-shadow: var(--sh-card); }
.bk-row-body { flex: 1; min-width: 0; }
.bk-row-name { font-size: 16px; font-weight: 800; color: var(--text-main); }
.bk-row-price { font-size: 15px; font-weight: 800; color: var(--price-red); margin-top: 2px; }
.bk-row-price span { color: var(--text-sub); font-weight: 600; }

.bk-stepper { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; background: #faf9f5; flex-shrink: 0; }
.bk-stepper button { width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent; color: var(--primary-green); font-size: 22px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bk-stepper button:disabled { color: #c9c9c9; cursor: default; }
.bk-stepper output { min-width: 30px; text-align: center; font-size: 18px; font-weight: 800; color: var(--text-main); }

/* Choice cards (e.g. pickup / call-a-car, delivery date) */
.bk-choices { display: flex; gap: 10px; flex-wrap: wrap; }
.bk-choice { flex: 1 1 0; min-width: 96px; min-height: 48px; border: 1.5px solid var(--line); background: var(--card-bg); border-radius: var(--r-md); padding: 10px 12px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-main); cursor: pointer; text-align: center; }
.bk-choice[aria-pressed="true"] { border-color: var(--primary-green); background: var(--brand-tint); color: var(--primary-green); }
.bk-choice small { display: block; font-size: 12px; font-weight: 600; color: var(--text-sub); margin-top: 2px; }

/* Form fields + inline errors (same pattern as checkout) */
.bk-field { display: flex; flex-direction: column; gap: 6px; }
.bk-label { font-size: 15px; font-weight: 700; color: var(--ink); }
.bk-label .req { color: var(--error-red); }
.bk-input { width: 100%; box-sizing: border-box; min-height: 48px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; font: inherit; font-size: 16px; background: var(--surface); color: var(--text-main); }
.bk-input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bk-input.is-invalid { border-color: var(--error-red); }
.bk-error { display: none; font-size: 13px; color: var(--error-red); }
.bk-error.is-shown { display: block; }

/* Sticky bar — reuses .checkout-footer (fixed above the bottom nav) */
.checkout-footer.bk-bar { padding: 10px 20px 14px; }
.bk-bar-note { font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.bk-bar-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.bk-bar-qty { font-size: 16px; font-weight: 800; color: var(--text-main); }
.bk-bar-total { font-size: 26px; font-weight: 900; color: var(--price-red); }
.bk-btn { width: 100%; min-height: 52px; border: none; border-radius: var(--r-pill); background: var(--brand-strong); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.bk-btn:active { background: var(--brand-deep); }
.bk-btn:disabled { opacity: 0.5; cursor: default; }
.bk-btn.is-ghost { background: transparent; color: var(--primary-green); border: 1.5px solid #d6d4c9; }
.bk-btn.is-ghost:active { background: transparent; }

/* Bottom sheet (WhatsApp preview) */
.bk-sheet-overlay { position: fixed; inset: 0; background: var(--scrim); z-index: 2000; display: none; align-items: flex-end; }
.bk-sheet-overlay.is-open { display: flex; }
.bk-sheet { width: 100%; background: #fbfaf6; border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); box-sizing: border-box; animation: slideUp 0.25s var(--ease); }
.bk-sheet-handle { width: 44px; height: 5px; border-radius: var(--r-pill); background: #d8d6cc; margin: 0 auto 14px; }
.bk-sheet-title { font-family: var(--font-serif); font-size: 20px; font-weight: 900; letter-spacing: .5px; line-height: 1.25; color: var(--ink); margin: 0 0 4px; }
.bk-sheet-sub { font-size: 13px; color: var(--text-sub); margin: 0 0 14px; }
.bk-bubble { position: relative; background: var(--brand-tint-2); border-radius: var(--r-lg); padding: 14px 16px; font-size: 15px; line-height: 1.75; color: var(--text-main); white-space: pre-line; margin-bottom: 16px; }
.bk-bubble::after { content: ""; position: absolute; right: -6px; bottom: 10px; border: 8px solid transparent; border-left-color: var(--brand-tint-2); border-bottom-color: var(--brand-tint-2); }
.bk-sheet .bk-btn + .bk-btn { margin-top: 10px; }

/* Success state */
.bk-success { text-align: center; padding: 18px 8px 4px; }
.bk-success img { width: 100%; max-width: 320px; border-radius: var(--r-lg); display: block; margin: 0 auto 14px; }
.bk-success-title { font-family: var(--font-serif); font-size: 26px; font-weight: 900; color: var(--text-main); margin: 0 0 6px; }
.bk-success-text { font-size: 14px; line-height: 1.7; color: var(--text-sub); margin: 0 0 16px; }
.bk-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; color: var(--text-main); border-bottom: 1px solid var(--line); }
.bk-summary-row:last-child { border-bottom: none; }
.bk-summary-row .is-price { color: var(--price-red); font-weight: 800; }

/* ---------- B — 真空雞扒 (js/booking-sousvide.js, window.BK_SV) ---------- */
/* Vertical stack for the per-sauce .bk-row list (same row style as the qty row). */
.bksv-list { display: flex; flex-direction: column; gap: 10px; }
/* Three inline "真空包裝 / 方便保存 / 簡單翻熱" ticks inside the intro .bk-card. */
.bksv-ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; }
.bksv-tick { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-main); }
.bksv-tick svg { width: 16px; height: 16px; color: var(--primary-green); flex-shrink: 0; }
/* The order form is shown/hidden with style.display, so it cannot be a flex
   container — space its sections with margins instead of .bk-body's gap. */
#bksv-order-form > * + * { margin-top: 14px; }
#bksv-order-form > .bk-section-title { margin-top: 22px; margin-bottom: 0; }
/* The delivery window is ~30 days: one swipeable row instead of 10 rows of buttons. */
#bksv-date-choices { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; scrollbar-width: none; }
#bksv-date-choices::-webkit-scrollbar { display: none; }
#bksv-date-choices .bk-choice { flex: 0 0 88px; min-width: 88px; scroll-snap-align: start; }
/* Notice rows with long values (團餐「訂之前要知」): the label keeps one line,
   the value wraps and stays right-aligned. */
.bk-notice-row > :first-child { flex-shrink: 0; white-space: nowrap; }
.bk-notice-row > :last-child { text-align: right; min-width: 0; }

.bk-strip .bk-tile { width: 44px; height: 44px; font-size: 24px; border-radius: var(--r-md, 12px); }
.bk-strip .bk-entry-title { font-size: 16px; }
.bk-strip .bk-entry-title, .bk-strip .bk-entry-sub { display: block; }

/* Booking strip entries: real photo as the card background, text on a dark
   gradient at the bottom (white on ≥ rgba(0,0,0,.6) keeps AA contrast). */
.bk-strip .bk-entry { position: relative; min-height: 132px; align-items: flex-end; padding: 12px; border: none; overflow: hidden; background-color: var(--panel, #EBE8DC); background-size: cover; background-repeat: no-repeat; color: #fff; }
.bk-strip .bk-entry::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.12) 100%); }
.bk-strip .bk-entry-body { position: relative; z-index: 1; }
.bk-strip .bk-entry-title { color: #fff; font-size: 17px; }
.bk-strip .bk-entry-sub { color: rgba(255, 255, 255, 0.92); font-size: 12.5px; }
.bk-entry--group { background-image: url("../images/booking/group-card.webp"); background-position: center 62%; }
.bk-entry--sousvide { background-image: url("../images/booking/sousvide-pack.webp"); background-position: center 60%; }
.bk-strip .bk-entry-tag { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: var(--r-pill, 999px); background: var(--brand-strong, #6C7650); color: #fff; font-size: 12px; font-weight: 700; }

/* 團餐 rows: photo thumbnail + a typeable box count inside the stepper. */
.bk-thumb { width: 56px; height: 56px; border-radius: var(--r-md, 12px); object-fit: cover; flex-shrink: 0; background: var(--panel, #EBE8DC); }
.bk-qty-input { width: 48px; min-height: 44px; border: none; background: transparent; text-align: center; font: inherit; font-size: 18px; font-weight: 800; color: var(--ink, #333); padding: 0; -moz-appearance: textfield; appearance: textfield; }
.bk-qty-input::-webkit-outer-spin-button, .bk-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bk-qty-input:focus-visible { outline: 2px solid var(--brand, #758055); outline-offset: 2px; border-radius: 8px; }
/* iOS Safari gives date inputs an intrinsic width that pushes past the
   screen edge; reset the native look so the field obeys width: 100%. */
.bk-input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
/* Keep the longer 團餐 names (雙倍系列便當, 慢煮三文魚便當) on one line at 375–390px. */
#screen-group-booking .bk-row { gap: 10px; padding: 12px; }
#screen-group-booking .bk-thumb { width: 48px; height: 48px; }
#screen-group-booking .bk-row-name { font-size: 15px; white-space: nowrap; }
#screen-group-booking .bk-stepper button { width: 40px; }

/* Series icon in the home section titles and category pills. */
.sec-title .sec-ic { width: 22px; height: 22px; color: var(--brand, #758055); stroke-width: 1.8; }
.nav-pill-btn .pill-ic { width: 16px; height: 16px; margin-right: 5px; color: var(--brand, #758055); stroke-width: 1.8; vertical-align: -3px; }
