/* ═══════════════════════════════════════════════════════════════════════
   QBC MOBILE UX PATCH — booking-mobile.css
   Load AFTER assets/css/booking-drawer.css on index.html
   (and after hyperfly.css on booking.html).
   Every rule is scoped to ≤767px except the two desktop-hiding rules
   at the top. Desktop rendering is unchanged.
   ═══════════════════════════════════════════════════════════════════════ */

/* hidden on desktop; shown by the media query below */
.qbc-hero-m { display: none; }
.qbc-mback { display: none; }
.qbc-mprice { display: none; }

/* touch devices: the theme's mouse-cursor ornament sticks at the last tap
   point and shows as a stray gold ring — hide it wherever there's no mouse */
@media (hover: none), (pointer: coarse) {
  .custom-cursor__cursor, .custom-cursor__cursor-two { display: none !important; }
}

@media (max-width: 767px) {

  /* ── 1. Header: bigger, clearer logo ─────────────────────────────── */
  .main-header__logo img {
    height: 72px !important;
    width: auto !important;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .75)) brightness(1.12);
  }
  /* the 72px logo overflows the header, so the header's 1px bottom border
     draws a line through it — drop the hairline on phones */
  .main-header--two { border-bottom: none !important; }

  /* ── 2. Hero: photo band on top, booking card below ──────────────── */
  .main-slider-one { height: auto !important; min-height: 0 !important; background: #050506 !important; }
  /* desktop owl slider hidden on phones — the mobile photo set replaces it */
  .main-slider-one .hero-bg-slider { display: none !important; }
  .main-slider-one__overlay {
    height: 56vh; height: 56svh; bottom: auto !important;
    background: linear-gradient(180deg, rgba(5,5,6,.5) 0%, rgba(5,5,6,.08) 30%, rgba(5,5,6,.18) 62%, rgba(5,5,6,.72) 86%, #050506 100%) !important;
  }
  /* mobile photo rotation (markup added in index.html).
     svh (not vh): on iOS Safari vh includes the space behind the browser
     bars, which made the band ~100px taller than the prototype. */
  .qbc-hero-m { display: block; position: absolute; top: 0; left: 0; right: 0; height: 56vh; height: 56svh; overflow: hidden; z-index: 0; }
  .qbc-hero-m img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; animation: qbcHeroFade 26s infinite;
  }
  .qbc-hero-m .m1 { object-position: center 42%; }
  .qbc-hero-m .m2 { object-position: center 45%; animation-delay: 6.5s; }
  .qbc-hero-m .m3 { object-position: center 55%; animation-delay: 13s; }
  .qbc-hero-m .m4 { object-position: center 72%; animation-delay: 19.5s; }
  @keyframes qbcHeroFade {
    0% { opacity: 0; transform: scale(1); }
    5% { opacity: 1; }
    25% { opacity: 1; transform: scale(1.05); }
    31% { opacity: 0; transform: scale(1.06); }
    100% { opacity: 0; }
  }
  /* title anchored to the base of the photo band.
     !important needed: hyperfly.css has legacy mobile hacks
     (.main-slider-one .container { padding-top: 0 !important } and
     .main-slider-one__content { margin-top: 190px !important }) that
     otherwise re-center the title over the photo. */
  .main-slider-one .container.tabs-box { padding-top: calc(56vh - 125px) !important; padding-top: calc(56svh - 125px) !important; padding-bottom: 40px; }
  .main-slider-one__content { margin-top: 0 !important; }
  /* prototype is left-aligned; hyperfly's legacy mobile hacks center it */
  .main-slider-one__content { text-align: left !important; }
  .main-slider-one__sub-title { justify-content: flex-start !important; padding: 0 15px; }
  .main-slider-one__sub-title { font-size: 16px; text-shadow: 0 1px 12px rgba(0,0,0,.65); margin-bottom: 14px; }
  .main-slider-one__sub-title i { font-size: 24px; }
  .main-slider-one__title {
    font-size: 40px !important; line-height: 50px !important;
    text-shadow: 0 2px 24px rgba(0,0,0,.7), 0 1px 3px rgba(0,0,0,.5);
  }

  /* ── 3. Slim bar → stacked booking card (below the photo) ────────── */
  .main-slider-one .qbc-slimbar { position: static !important; padding: 0 15px !important; margin-top: 22px; }
  .qbc-slimbar-row {
    flex-direction: column; align-items: stretch; gap: 8px;
    border-radius: 20px; padding: 14px;
  }
  .qbc-slimbar-seg { width: 100%; margin: 0 0 2px; }
  .qbc-slimbar-seg button { flex: 1; padding: 12px; }
  .qbc-slimbar-cell {
    flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border-left: 0; background: #1c1c1f; border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px; padding: 15px 16px;
  }
  .qbc-slimbar-cell .l { margin: 0; flex: none; }
  .qbc-slimbar-cell .v { text-align: right; font-size: 15px; }
  .qbc-slimbar-cta { width: 100%; margin: 4px 0 0; padding: 16px 22px; }
  .qbc-slimbar-hint { text-align: center; }

  /* ── 4. Drawer: full-screen sheet sliding up from the bottom ─────── */
  .qbc-drawer {
    width: 100vw !important; left: 0; border-left: 0;
    transform: translateY(105%);
  }
  .qbc-drawer.open { transform: translateY(0); }
  /* back chevron (injected by booking-drawer.js) */
  .qbc-mback {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; flex: none;
    background: var(--surface2, #1c1c1f); border: 1px solid var(--line, rgba(255,255,255,.08));
    color: var(--txt, #f2f0ea); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 0 3px;
  }
  .qbc-drawer-head { gap: 10px; }

  /* ── 5. Touch targets + inputs (16px stops iOS zoom-on-focus) ────── */
  .qbc-drawer .qbc-field .bl-input,
  .qbc-drawer .dform input, .qbc-drawer .dform select, .qbc-drawer .dform textarea {
    font-size: 16px !important; padding: 14px 15px;
  }
  .qbc-st { width: 44px; height: 44px; font-size: 20px; }
  .qbc-drawer .st-btn { width: 44px; height: 44px; }
  .qbc-drawer .veh-thumb { width: 78px; height: 56px; }
  .qbc-drawer .pref-chip { padding: 11px 16px; font-size: 14px; }
  .qbc-drawer .consent { font-size: 14px; }

  /* ── 6. Footer: price chip + primary button; Back lives in the head ─ */
  .qbc-mprice {
    display: flex; flex-direction: column; justify-content: center; gap: 2px;
    background: none; border: 0; text-align: left; cursor: pointer;
    padding: 0 8px 0 2px; flex: none;
  }
  .qbc-mprice .mp-t { font-size: 17px; font-weight: 600; color: var(--gold, #c8a45c); }
  .qbc-mprice .mp-s { font-size: 11px; color: var(--muted, #8a8a90); }
  .qbc-drawer-foot .btn-s { display: none; } /* Back button proxied by the head chevron */

  /* ── 7. Fleet tabs → one swipeable chip row ──────────────────────── */
  .tab-one__tabs {
    display: flex !important; grid-template-columns: none !important;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: 8px; border: 0; padding: 2px 4px 8px; margin-bottom: 34px;
    justify-content: flex-start;
  }
  .tab-one__tabs::-webkit-scrollbar { display: none; }
  .tab-one__tabs li {
    flex: none; width: auto; flex-direction: row; gap: 8px;
    border: 1px solid rgba(3, 13, 23, .15) !important; border-radius: 999px;
    padding: 11px 18px !important; font-size: 14px !important;
  }
  .tab-one__tabs li::after { height: 100%; top: 0; border-radius: 999px; }
  .tab-one__tabs li i { font-size: 18px !important; line-height: 1 !important; margin: 0 !important; }

  /* ── 8. booking.html (trip-app column): input sizing parity ──────── */
  .trip-app #details_form input, .trip-app #details_form select, .trip-app #details_form textarea,
  .trip-app .booking-field input, .trip-app .booking-field select, .trip-app .booking-field textarea {
    font-size: 16px;
  }
}

/* very narrow phones: keep the headline to two lines */
@media (max-width: 374px) {
  .main-slider-one__title { font-size: 36px !important; line-height: 45px !important; }
}

/* desktop: lower the hero text ~70px (moved from its bottom margin so the
   booking bar below stays where it was) */
@media (min-width: 768px) {
  .main-slider-one__content { margin-top: 70px; margin-bottom: -1px; }
}
