/* ===================================================================
   BOOKING DRAWER (concept 1a) — slim trigger bar + right-hand drawer.
   All styles scoped under .qbc-slimbar / .qbc-drawer / .qbc-scrim per
   HANDOFF_BOOKING_DRAWER.md. Existing site classes are NOT restyled.
   =================================================================== */

/* Design tokens (drawer + bar only) */
.qbc-slimbar, .qbc-drawer {
  --gold: #c8a45c;
  --gold-dim: rgba(200, 164, 92, .16);
  --gold-line: rgba(200, 164, 92, .32);
  --bg: #0b0b0d;
  --canvas: #050506;
  --surface: #151517;
  --surface2: #1c1c1f;
  --txt: #f2f0ea;
  --muted: #8a8a90;
  --line: rgba(255, 255, 255, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.qbc-drawer .mono, .qbc-slimbar .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* ── Slim trigger bar (replaces the old expanding widget; never grows) ── */
.qbc-slimbar { position: relative; max-width: 940px; margin: 0 auto; z-index: 100; }
/* Desktop: rest near the hero's bottom edge — the same anchoring the old widget
   had (bottom: 8vh), so the 100vh hero doesn't leave a void under the bar. */
@media (min-width: 992px) {
  .main-slider-one .qbc-slimbar { position: absolute; bottom: 8vh; left: 0; right: 0; }
}
.qbc-slimbar-row {
  display: flex; align-items: stretch; gap: 0;
  background: rgba(13, 13, 15, .92); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(14px); padding: 8px; cursor: pointer;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
}
.qbc-slimbar-seg { display: flex; gap: 3px; background: var(--surface2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; align-self: center; margin-right: 10px; flex: none; }
.qbc-slimbar-seg button { background: transparent; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.qbc-slimbar-seg button.on { background: #2e2e33; color: var(--txt); }
.qbc-slimbar-cell { flex: 1; min-width: 0; padding: 6px 14px; border-left: 1px solid var(--line); }
.qbc-slimbar-cell:first-of-type { border-left: 0; }
.qbc-slimbar-cell .l { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.qbc-slimbar-cell .v { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbc-slimbar-cell .v.set { color: var(--txt); }
.qbc-slimbar-cta {
  flex: none; align-self: center; margin-left: 10px;
  background: var(--gold); color: #1a1305; border: 0; border-radius: 12px;
  padding: 14px 22px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.qbc-slimbar-cta:hover { background: #b08d4a; }
.qbc-slimbar-hint { margin-top: 10px; font-size: 12.5px; color: rgba(255, 255, 255, .55); }

@media (max-width: 767px) {
  .qbc-slimbar { padding: 0 15px; }
  .qbc-slimbar-row { flex-wrap: wrap; gap: 6px; }
  .qbc-slimbar-seg { width: 100%; margin: 0; }
  .qbc-slimbar-seg button { flex: 1; }
  .qbc-slimbar-cell { flex: 1 1 40%; border-left: 0; }
  .qbc-slimbar-cta { width: 100%; margin: 4px 0 0; }
  .qbc-slimbar-hint { padding: 0 2px; }
}

/* ── Scrim ── */
.qbc-scrim {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s;
}
.qbc-scrim.open { opacity: 1; visibility: visible; transition: opacity .5s ease; }

/* ── Drawer shell ── */
.qbc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999;
  width: min(440px, 100vw); height: 100dvh;
  background: var(--bg); border-left: 1px solid var(--line); color: var(--txt);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .5s cubic-bezier(.32, .72, .28, 1);
  box-shadow: -40px 0 90px -40px rgba(0, 0, 0, .9);
}
.qbc-drawer.open { transform: translateX(0); }
@media (max-width: 600px) { .qbc-drawer { width: 100vw; border-left: 0; } }
@media (prefers-reduced-motion: reduce) { .qbc-drawer, .qbc-scrim { transition: none; } }
body.qbc-drawer-open { overflow: hidden; }
body.qbc-drawer-open .pac-container { z-index: 100001 !important; }

.qbc-drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.qbc-drawer-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--txt); }
.qbc-drawer-brand::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.qbc-drawer-close { background: var(--surface2); border: 1px solid var(--line); color: var(--muted); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.qbc-drawer-close:hover { color: var(--txt); }
.qbc-drawer-close:focus-visible, .qbc-slimbar-cta:focus-visible, .qbc-slimbar-seg button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.qbc-drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 8px; position: relative; }
.qbc-drawer-foot { flex: none; display: flex; gap: 9px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #0e0e10; }
.qbc-drawer-foot:empty { display: none; }
.qbc-drawer-foot .btn-p { flex: 1; }

/* Step indicator */
.qbc-steps { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 2px 14px; }
.qbc-steps .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .45; flex: none; }
.qbc-steps .rule { flex: 1; height: 1px; background: var(--line); }
.qbc-steps .st { display: inline-flex; align-items: center; gap: 6px; }
.qbc-steps .st.on { color: var(--gold); }
.qbc-steps .st.on .dot { background: var(--gold); opacity: 1; }
.qbc-steps .st.done { color: var(--txt); }
.qbc-steps .st.done .dot { background: var(--txt); opacity: .8; }

/* ── Plan screen ── */
.qbc-plan-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 12px; }
.qbc-plan-title { font-size: 13px; letter-spacing: .06em; color: var(--muted); font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.qbc-plan-region { font-size: 12px; color: var(--muted); }
.qbc-plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.qbc-plan-hint { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; padding: 0 4px; }

.qbc-seg { display: flex; gap: 3px; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.qbc-seg button { flex: 1; background: transparent; border: 0; color: var(--muted); font-size: 14px; font-weight: 600; padding: 11px; border-radius: 9px; cursor: pointer; }
.qbc-seg button.on { background: #2e2e33; color: var(--txt); }
.qbc-seg button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.qbc-field { position: relative; }
.qbc-field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.qbc-field .hint { color: var(--gold); font-size: 11px; }
.qbc-drawer .qbc-field .bl-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 36px 13px 14px; color: var(--txt); font-size: 15px; height: auto; line-height: 1.3;
}
.qbc-drawer .qbc-field .bl-input::placeholder { color: rgba(255, 255, 255, .32); }
.qbc-drawer .qbc-field .bl-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.qbc-drawer .qbc-field .bl-custom-select { position: relative; }
.qbc-drawer .qbc-field .bl-custom-select > i { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
.qbc-drawer .bl-dropdown-menu { max-height: 240px; overflow-y: auto; min-width: 0; z-index: 60; }
.qbc-drawer .bl-calendar-popup { z-index: 60; }
.qbc-two { display: flex; gap: 10px; }
.qbc-two > * { flex: 1; min-width: 0; }

/* validation: red outline + shake (prototype treatment) */
.qbc-field.qbc-invalid .bl-input { border-color: #ef4444; outline: 1px solid rgba(239, 68, 68, .55); }
.qbc-shake { animation: qbc-shake .4s ease; }
@keyframes qbc-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .qbc-shake { animation: none; } }

/* steppers (plan) */
.qbc-stepper-box { background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.qbc-stepper-box .pl { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.qbc-stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qbc-stepper span { color: var(--txt); font-size: 15px; min-width: 18px; text-align: center; }
.qbc-st { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid rgba(255, 255, 255, .12); color: var(--txt); font-size: 17px; line-height: 1; cursor: pointer; padding: 0; }
.qbc-st:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Flow screens (vehicle/details/payment/success) reuse the shared booking
   classes from hyperfly.css (.veh-card, .paycard, .sheet, .srow, .seg, …) —
   they resolve their CSS variables from .qbc-drawer's tokens above.
   Drawer-local mirrors for the pieces that were scoped to .trip-app: */
.qbc-drawer .btn-p, .qbc-drawer .btn-s { border-radius: 15px; padding: 14px 18px; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.qbc-drawer .btn-p { background: var(--gold); color: #1a1305; border: 0; }
.qbc-drawer .btn-p:disabled { opacity: .5; cursor: default; }
.qbc-drawer .btn-s { background: transparent; color: var(--txt); border: 1px solid var(--line); }
.qbc-drawer .btn-p:focus-visible, .qbc-drawer .btn-s:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.qbc-sum { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 12px; }
.qbc-sum .l { min-width: 0; font-size: 13px; color: var(--muted); }
.qbc-sum .l b { display: block; color: var(--txt); font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbc-sum .r { text-align: right; flex: none; font-size: 11px; color: var(--muted); }
.qbc-sum .r .price { display: block; color: var(--gold); font-weight: 600; font-size: 15px; }

.qbc-drawer .sec-h { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 20px 0 10px; }
.qbc-drawer .dform input, .qbc-drawer .dform select, .qbc-drawer .dform textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; color: var(--txt); font-size: 15px;
}
.qbc-drawer .dform input::placeholder, .qbc-drawer .dform textarea::placeholder { color: rgba(255, 255, 255, .32); }
.qbc-drawer .dform input:focus-visible, .qbc-drawer .dform select:focus-visible, .qbc-drawer .dform textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.qbc-drawer .dform label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.qbc-drawer .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.qbc-drawer .consent input { width: auto; margin-top: 2px; accent-color: var(--gold); }
.qbc-drawer .muted { color: var(--muted); }

/* gratuity segmented with $ amounts (prototype) */
.qbc-grat button { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.qbc-grat button .amt { font-size: 11.5px; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--muted); font-weight: 400; }
.qbc-grat button.on { background: var(--gold-dim); color: var(--gold); border-radius: 9px; }
.qbc-grat button.on .amt { color: var(--gold); }

/* success */
.qbc-success-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--gold-dim); border: 1px solid var(--gold-line); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 18px auto 14px; }
.qbc-success { text-align: center; }
.qbc-success .ref { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--txt); }

/* calendar popup inside the drawer: hyperfly.css sizes/centers it for the old
   full-width hero widget (320px centered on the anchor field; width:100% of the
   field on <=991px). The drawer's Date field is only ~155-176px wide, so the
   popup spilled outside the drawer on desktop and the fixed 32px day cells
   overflowed the shrunken popup on mobile. Anchor it left, fixed width. */
.qbc-drawer .bl-calendar-popup {
  left: 0;
  width: 320px;
  max-width: none;
  transform: translateY(-5px);
}
.qbc-drawer .bl-calendar-popup.show {
  transform: translateY(0);
}
