﻿/* ============================================================================
   Vehicly Mobile App-Shell
   ----------------------------------------------------------------------------
   All rules are gated under html[data-vehicly-mobile="1"] so this file is
   inert on desktop. Activated by js/mobile-shell.js (auto-detect via
   matchMedia '(max-width: 768px) and (pointer: coarse)' OR display-mode:
   standalone OR localStorage.vehiclyForceMode override).
   ============================================================================ */

/* -- 1. Body padding for top-bar + bottom-nav + safe-area ------------------ */
html[data-vehicly-mobile="1"] body {
    padding-top: calc(52px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

/* Hide ALL desktop chrome that layout.js injects */
html[data-vehicly-mobile="1"] [data-vehicly-header],
html[data-vehicly-mobile="1"] [data-vehicly-header-rendered],
html[data-vehicly-mobile="1"] .vh-global-header,
html[data-vehicly-mobile="1"] .vh-menu-toggle,
html[data-vehicly-mobile="1"] .vh-nav-backdrop,
html[data-vehicly-mobile="1"] .vh-scroll-top { display: none !important; }

/* On admin / system pages keep body padding tight */
html[data-vehicly-mobile="1"] body[data-page="admin"],
html[data-vehicly-mobile="1"] body[data-page="404"],
html[data-vehicly-mobile="1"] body[data-page="onderhoud"],
html[data-vehicly-mobile="1"] body[data-page="geblokkeerd"] {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================================
   2. Top bar (slim, 52px + safe-area-top)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-mob-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(52px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: max(env(safe-area-inset-left, 0px), 12px);
    padding-right: max(env(safe-area-inset-right, 0px), 12px);
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--vh-border, #e7e5e4);
    z-index: 1050;
    transition: height .2s ease, background .2s ease, border-color .2s ease;
}
html[data-vehicly-mobile="1"] .vh-mob-topbar.is-condensed {
    height: calc(44px + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 1);
    border-bottom-color: rgba(0,0,0,.08);
}
html[data-vehicly-mobile="1"] .vh-mob-topbar.is-condensed .vh-mob-logo { font-size: .95rem; }
html[data-vehicly-mobile="1"] .vh-mob-topbar.is-condensed .vh-mob-back svg,
html[data-vehicly-mobile="1"] .vh-mob-topbar.is-condensed .vh-mob-avatar svg { width: 20px; height: 20px; }

html[data-vehicly-mobile="1"] .vh-mob-back,
html[data-vehicly-mobile="1"] .vh-mob-avatar {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: var(--vh-text, #1c1917);
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
html[data-vehicly-mobile="1"] .vh-mob-back:active,
html[data-vehicly-mobile="1"] .vh-mob-avatar:active { background: var(--vh-primary-soft, rgba(242,201,76,.08)); }
html[data-vehicly-mobile="1"] .vh-mob-back svg,
html[data-vehicly-mobile="1"] .vh-mob-avatar svg { width: 22px; height: 22px; }

html[data-vehicly-mobile="1"] .vh-mob-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--vh-text, #1c1917);
    font-family: var(--vh-font-display, Inter, sans-serif);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
html[data-vehicly-mobile="1"] .vh-mob-logo-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--vh-primary, #F2C94C);
    flex-shrink: 0;
}

/* ============================================================================
   3. Bottom nav (68px + safe-area-bottom)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-mob-bottomnav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--vh-border, #e7e5e4);
    z-index: 1000;
}
html[data-vehicly-mobile="1"] .vh-mob-bottomnav[data-tabs="3"] { grid-template-columns: repeat(3, 1fr); }
html[data-vehicly-mobile="1"] .vh-mob-bottomnav[data-tabs="5"] { grid-template-columns: repeat(5, 1fr); }

html[data-vehicly-mobile="1"] .vh-mob-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    text-decoration: none;
    color: var(--vh-text-tertiary, #6e6963);
    font-family: var(--vh-font-body, Inter, sans-serif);
    font-size: 10.5px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
}
html[data-vehicly-mobile="1"] .vh-mob-tab:active { background: var(--vh-primary-soft, rgba(242,201,76,.08)); }
html[data-vehicly-mobile="1"] .vh-mob-tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
html[data-vehicly-mobile="1"] .vh-mob-tab.is-active { color: var(--vh-primary-dark, #C49A22); }
html[data-vehicly-mobile="1"] .vh-mob-tab.is-active svg { stroke-width: 2; }
html[data-vehicly-mobile="1"] .vh-mob-tab-label { line-height: 1; }

/* Hide bottom nav on system + admin pages */
html[data-vehicly-mobile="1"] body[data-page="admin"] .vh-mob-bottomnav,
html[data-vehicly-mobile="1"] body[data-page="404"] .vh-mob-bottomnav,
html[data-vehicly-mobile="1"] body[data-page="onderhoud"] .vh-mob-bottomnav,
html[data-vehicly-mobile="1"] body[data-page="geblokkeerd"] .vh-mob-bottomnav { display: none !important; }

/* ============================================================================
   4. Sticky CTA slot (above bottom nav)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-mob-ctaslot {
    position: fixed;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 0; right: 0;
    padding: 10px max(env(safe-area-inset-left, 0px), 14px);
    padding-right: max(env(safe-area-inset-right, 0px), 14px);
    z-index: 999;
    pointer-events: none;
}
html[data-vehicly-mobile="1"] .vh-mob-ctaslot:empty { display: none; }
html[data-vehicly-mobile="1"] .vh-mob-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    background: var(--vh-primary, #F2C94C);
    color: var(--vh-on-primary, #1a1a1a);
    border: none;
    border-radius: 14px;
    font-family: var(--vh-font-display, Inter, sans-serif);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(178,150,90,.08));
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    animation: vh-mob-cta-rise .25s cubic-bezier(.2,.7,.3,1) both;
}
html[data-vehicly-mobile="1"] .vh-mob-cta:active { transform: translateY(1px); }

/* When bottom nav is hidden, drop CTA to bottom edge */
html[data-vehicly-mobile="1"] body[data-page="admin"] .vh-mob-ctaslot,
html[data-vehicly-mobile="1"] body[data-page="404"] .vh-mob-ctaslot,
html[data-vehicly-mobile="1"] body[data-page="onderhoud"] .vh-mob-ctaslot,
html[data-vehicly-mobile="1"] body[data-page="geblokkeerd"] .vh-mob-ctaslot {
    bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes vh-mob-cta-rise {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================================
   5. Card mobile wrap (set as class on .result-card root in buyer-index.js)
   ============================================================================ */
html[data-vehicly-mobile="1"] .result-card.vh-card-mobile-wrap {
    border-radius: 18px;
    margin: 12px 10px;
    padding: 16px 14px;
    box-shadow: var(--shadow-md);
}

/* Force spec grid to single column on mobile */
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-spec-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
}
@media (max-width: 380px) {
    html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-spec-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tighten price grid */
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-price-section .price-grid,
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .price-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
}

/* Action floats stay visible but become compact */
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-actions-float {
    flex-wrap: wrap;
    gap: 4px;
}
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-act {
    min-width: 36px;
    min-height: 36px;
}

/* Reasoning dots compact */
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-reasoning-list { gap: 6px; }

/* Card title sizing */
html[data-vehicly-mobile="1"] .vh-card-mobile-wrap .card-title {
    font-size: 1.15rem;
    line-height: 1.25;
}

/* ============================================================================
   6. Sheet modal (mobile-sheet.js adds .vh-sheet-mode + .vh-sheet-box)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-modal-overlay.vh-sheet-mode {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(20, 20, 20, 0.55);
}
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    max-height: 85svh;
    max-height: 85vh;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
    animation: vh-mob-sheet-up .28s cubic-bezier(.2,.7,.3,1) both;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
}
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box::before {
    content: "";
    position: sticky;
    top: 6px;
    display: block;
    width: 40px; height: 4px;
    margin: 6px auto 8px;
    border-radius: 2px;
    background: var(--vh-text-tertiary-soft, #d6d3d1);
}
html[data-vehicly-mobile="1"] .vh-modal-overlay.vh-sheet-mode.is-dragging .vh-sheet-box {
    transition: none !important;
}

@keyframes vh-mob-sheet-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* When modal/sheet is open, hide bottom nav from a11y tree (JS sets aria-hidden) */
html[data-vehicly-mobile="1"] .vh-mob-bottomnav[aria-hidden="true"] {
    pointer-events: none;
}

/* ============================================================================
   7. View-mode toggle (rendered into [data-vh-mobile-toggle] containers)
   ============================================================================ */
.vh-mob-toggle-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--vh-border, #e7e5e4);
    border-radius: 14px;
    background: var(--vh-surface, #fff);
}
.vh-mob-toggle-card h3 {
    margin: 0 0 4px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--vh-text, #1c1917);
}
.vh-mob-toggle-card .vh-mob-toggle-desc {
    margin: 0 0 12px;
    color: var(--vh-text-secondary, #57534e);
    font-size: .82rem;
}
.vh-mob-toggle-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px;
    background: var(--vh-bg, #faf9f7);
    border-radius: 10px;
}
.vh-mob-toggle-options label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--vh-text-secondary, #57534e);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.vh-mob-toggle-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vh-mob-toggle-options label:has(input[type="radio"]:checked) {
    background: var(--vh-surface, #fff);
    color: var(--vh-text, #1c1917);
    box-shadow: var(--shadow-sm);
}
.vh-mob-toggle-hint {
    margin: 10px 0 0;
    font-size: .75rem;
    color: var(--vh-text-tertiary, #6e6963);
}

/* ============================================================================
   8. Per-page mobile tweaks
   ============================================================================ */

/* Index / Zoeken — full-width content, no horizontal margin chrome */
html[data-vehicly-mobile="1"] body[data-page="index"] .vh-buyer-hero,
html[data-vehicly-mobile="1"] body[data-page="zoeken"] .vh-buyer-hero {
    padding-left: 16px;
    padding-right: 16px;
}

/* Profile — accordion-style sections, sticky save area */
html[data-vehicly-mobile="1"] body[data-page="profiel"] .pf-card,
html[data-vehicly-mobile="1"] body[data-page="profiel"] .pf-section {
    margin: 10px 12px;
    border-radius: 14px;
}
html[data-vehicly-mobile="1"] body[data-page="profiel"] .pf-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
html[data-vehicly-mobile="1"] body[data-page="profiel"] .pf-tabs::-webkit-scrollbar { display: none; }
html[data-vehicly-mobile="1"] body[data-page="profiel"] .pf-tab { flex-shrink: 0; }

/* Prijzen — vertical plan cards full width */
html[data-vehicly-mobile="1"] body[data-page="prijzen"] .plan-grid,
html[data-vehicly-mobile="1"] body[data-page="prijzen"] .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
    padding: 0 14px;
}

/* Inloggen / Registreren — full-width forms */
html[data-vehicly-mobile="1"] body[data-page="inloggen"] .auth-card,
html[data-vehicly-mobile="1"] body[data-page="registreren"] .auth-card,
html[data-vehicly-mobile="1"] body[data-page="email-verificatie"] .auth-card {
    margin: 16px 12px;
    padding: 22px 18px;
    border-radius: 16px;
}

/* Contact — full-width form */
html[data-vehicly-mobile="1"] body[data-page="contact"] .contact-form,
html[data-vehicly-mobile="1"] body[data-page="contact"] .v-contact {
    margin: 12px;
    border-radius: 14px;
}

/* Legal pages — tighten content margins */
html[data-vehicly-mobile="1"] body[data-page="voorwaarden"] .legal-content,
html[data-vehicly-mobile="1"] body[data-page="privacy"] .legal-content,
html[data-vehicly-mobile="1"] body[data-page="cookies"] .legal-content,
html[data-vehicly-mobile="1"] body[data-page="toegankelijkheid"] .legal-content {
    padding: 14px 16px;
}

/* Admin — slim back chip on top */
html[data-vehicly-mobile="1"] body[data-page="admin"] {
    padding-top: calc(52px + env(safe-area-inset-top, 0px));
}

/* Hulp / FAQ — let <details> feel touch-friendly */
html[data-vehicly-mobile="1"] body[data-page="hulp"] details {
    padding: 6px 4px;
}
html[data-vehicly-mobile="1"] body[data-page="hulp"] details > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* ============================================================================
   9. Generic touch-friendly tweaks (within mobile mode only)
   ============================================================================ */

/* Bigger tap targets for inline links + small buttons */
html[data-vehicly-mobile="1"] button,
html[data-vehicly-mobile="1"] .v-btn,
html[data-vehicly-mobile="1"] input[type="submit"] {
    min-height: 44px;
}

/* Ensure inputs are at least 16px to disable iOS zoom-on-focus */
html[data-vehicly-mobile="1"] input[type="text"],
html[data-vehicly-mobile="1"] input[type="email"],
html[data-vehicly-mobile="1"] input[type="password"],
html[data-vehicly-mobile="1"] input[type="url"],
html[data-vehicly-mobile="1"] input[type="tel"],
html[data-vehicly-mobile="1"] input[type="search"],
html[data-vehicly-mobile="1"] textarea,
html[data-vehicly-mobile="1"] select {
    font-size: 16px;
}

/* Skip-link should appear above mobile chrome on focus */
html[data-vehicly-mobile="1"] .vh-skip-link:focus {
    top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
    z-index: 1100;
}

/* Hide native print button in mobile (Web Share is better; print stays available via card-act though) */
@media print {
    html[data-vehicly-mobile="1"] .vh-mob-topbar,
    html[data-vehicly-mobile="1"] .vh-mob-bottomnav,
    html[data-vehicly-mobile="1"] .vh-mob-ctaslot { display: none !important; }
    html[data-vehicly-mobile="1"] body { padding: 0 !important; }
}

/* ----------------------------------------------------------------------------
 * Mobile chrome z-index reconciliation
 * Audit-fix: old fixed/sticky chrome from buyer-index.css collides with the
 * mobile-shell top-bar (52px) and bottom-nav (68px). Hide/push them so they
 * never land behind or on top of the native shell.
 * ---------------------------------------------------------------------------- */
html[data-vehicly-mobile="1"] .sb-open-btn { display: none !important; }
html[data-vehicly-mobile="1"] .scroll-to-top,
html[data-vehicly-mobile="1"] .toast-container,
html[data-vehicly-mobile="1"] #toast-container {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
}
html[data-vehicly-mobile="1"] .credit-banner {
    top: calc(52px + env(safe-area-inset-top, 0px)) !important;
}
html[data-vehicly-mobile="1"] .vh-help-fab,
html[data-vehicly-mobile="1"] #vhDemoBanner {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ============================================================================
   10. Skeleton screens (mobile-only shimmer placeholders)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-skeleton-card {
    min-height: 180px;
    margin: 12px 10px;
    border-radius: 18px;
    background: var(--vh-surface, #fff);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
html[data-vehicly-mobile="1"] .vh-skeleton-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.05) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: vh-skeleton-shimmer 1.6s linear infinite;
}
html[data-vehicly-mobile="1"] .vh-skeleton-line {
    height: 14px;
    margin: 8px 16px;
    border-radius: 6px;
    background: rgba(0,0,0,.06);
}
html[data-vehicly-mobile="1"] .vh-skeleton-line:first-child { margin-top: 18px; width: 60%; }
html[data-vehicly-mobile="1"] .vh-skeleton-line:nth-child(2) { width: 85%; }
html[data-vehicly-mobile="1"] .vh-skeleton-line:nth-child(3) { width: 70%; }
@keyframes vh-skeleton-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ============================================================================
   11. View Transitions API (Chrome 126+ / Safari 18+ cross-document)
   ============================================================================ */
@view-transition { navigation: auto; }

html[data-vehicly-mobile="1"] .vh-mob-topbar { view-transition-name: vh-topbar; }
html[data-vehicly-mobile="1"] .vh-mob-bottomnav { view-transition-name: vh-bottomnav; }

::view-transition-old(vh-topbar),
::view-transition-new(vh-topbar),
::view-transition-old(vh-bottomnav),
::view-transition-new(vh-bottomnav) {
    animation: none !important;
    mix-blend-mode: normal;
}

html[data-vehicly-mobile="1"] ::view-transition-old(root) {
    animation: 200ms cubic-bezier(.2,.7,.3,1) both vh-vt-fade-out;
}
html[data-vehicly-mobile="1"] ::view-transition-new(root) {
    animation: 220ms cubic-bezier(.2,.7,.3,1) both vh-vt-slide-in;
}
@keyframes vh-vt-fade-out { to { opacity: 0; transform: translateX(-12%); } }
@keyframes vh-vt-slide-in { from { opacity: 0; transform: translateX(20%); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    html[data-vehicly-mobile="1"] ::view-transition-old(root),
    html[data-vehicly-mobile="1"] ::view-transition-new(root) {
        animation: 150ms ease both vh-vt-soft;
    }
    @keyframes vh-vt-soft { from { opacity: 0; } to { opacity: 1; } }
}

/* ============================================================================
   12. Pull-to-refresh indicator (T2.1)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-mob-ptr {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 0; right: 0;
    height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    z-index: 1049;
    transition: height .2s cubic-bezier(.2,.7,.3,1);
}
html[data-vehicly-mobile="1"] .vh-mob-ptr.is-active { height: 60px; }
html[data-vehicly-mobile="1"] .vh-mob-ptr-spinner {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--vh-primary, #F2C94C);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    display: flex; align-items: center; justify-content: center;
    transform: rotate(0deg);
    transition: transform .15s linear;
}
html[data-vehicly-mobile="1"] .vh-mob-ptr.is-pulling .vh-mob-ptr-spinner {
    transform: rotate(calc(var(--ptr-pct, 0) * 360deg));
}
html[data-vehicly-mobile="1"] .vh-mob-ptr.is-refreshing .vh-mob-ptr-spinner {
    animation: vh-mob-ptr-spin .8s linear infinite;
}
html[data-vehicly-mobile="1"] .vh-mob-ptr-spinner::after {
    content: "";
    width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,.15);
    border-top-color: rgba(0,0,0,.7);
    border-radius: 50%;
}
@keyframes vh-mob-ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================================
   13. Install banner sheet (T1.6)
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-install-sheet {
    text-align: center;
    padding: 8px 8px 16px;
}
html[data-vehicly-mobile="1"] .vh-install-icon {
    width: 64px; height: 64px;
    margin: 12px auto 16px;
    border-radius: 14px;
    background: var(--vh-primary, #F2C94C);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(242,201,76,.35);
}
html[data-vehicly-mobile="1"] .vh-install-icon svg { width: 36px; height: 36px; }
html[data-vehicly-mobile="1"] .vh-install-title {
    font-family: var(--vh-font-display, Inter, sans-serif);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--vh-text, #1c1917);
}
html[data-vehicly-mobile="1"] .vh-install-body {
    font-size: .92rem;
    line-height: 1.45;
    color: var(--vh-text-secondary, #57534e);
    margin: 0 16px 18px;
}
html[data-vehicly-mobile="1"] .vh-install-actions {
    display: grid;
    gap: 8px;
    padding: 0 12px;
}
html[data-vehicly-mobile="1"] .vh-install-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-family: var(--vh-font-display, Inter, sans-serif);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
html[data-vehicly-mobile="1"] .vh-install-btn--primary {
    background: var(--vh-primary, #F2C94C);
    color: var(--vh-on-primary, #1a1a1a);
}
html[data-vehicly-mobile="1"] .vh-install-btn--ghost {
    background: transparent;
    color: var(--vh-text-secondary, #57534e);
}
html[data-vehicly-mobile="1"] .vh-install-btn:active { transform: translateY(1px); }

/* ============================================================================
   14. App-Feel (v1) — hide-on-scroll nav, tap-scale, FAB, sticky headers,
        toast stack, context menu, empty states, splash crossfade
   ============================================================================ */

/* 14.1 Hide-on-scroll bottom nav (translateY when scrolling down) */
html[data-vehicly-mobile="1"] .vh-mob-bottomnav {
    transition: transform .22s cubic-bezier(.2,.7,.3,1), opacity .22s ease;
    will-change: transform;
}
html[data-vehicly-mobile="1"] .vh-mob-bottomnav.is-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}
/* CTA slot follows nav-hide */
html[data-vehicly-mobile="1"] .vh-mob-ctaslot {
    transition: transform .22s cubic-bezier(.2,.7,.3,1), opacity .22s ease;
}
html[data-vehicly-mobile="1"] .vh-mob-ctaslot.is-nav-hidden {
    transform: translateY(60px);
    opacity: 0;
    pointer-events: none;
}

/* 14.2 Tap-scale press feedback */
html[data-vehicly-mobile="1"] .vh-is-pressed {
    transform: scale(0.97) !important;
    transition: transform .08s cubic-bezier(.4,0,.2,1) !important;
    filter: brightness(0.98);
}
html[data-vehicly-mobile="1"] .vh-mob-tab.vh-is-pressed { transform: scale(0.92) !important; }
html[data-vehicly-mobile="1"] .vh-mob-fab.vh-is-pressed { transform: scale(0.93) !important; }

/* Global touch-action manipulation removes 300ms delay */
html[data-vehicly-mobile="1"] a,
html[data-vehicly-mobile="1"] button,
html[data-vehicly-mobile="1"] [data-vh-tap] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 14.3 Active tab — stronger visual + indicator pill */
html[data-vehicly-mobile="1"] .vh-mob-tab {
    position: relative;
}
html[data-vehicly-mobile="1"] .vh-mob-tab.is-active::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--vh-primary, #F2C94C);
}
html[data-vehicly-mobile="1"] .vh-mob-tab.is-active .vh-mob-tab-label { font-weight: 600; }
html[data-vehicly-mobile="1"] .vh-mob-tab.is-active svg { stroke-width: 2.2; }

/* 14.4 Floating Action Button (FAB) */
html[data-vehicly-mobile="1"] .vh-mob-fab {
    position: fixed;
    right: max(env(safe-area-inset-right, 0px), 16px);
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--vh-primary, #F2C94C);
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(242,201,76,.45), 0 3px 8px rgba(0,0,0,.12);
    z-index: 998;
    transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, opacity .2s ease;
    animation: vh-mob-fab-in .35s cubic-bezier(.34,1.56,.64,1) both;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
}
html[data-vehicly-mobile="1"] .vh-mob-fab:active {
    transform: scale(0.93);
    box-shadow: 0 4px 12px rgba(242,201,76,.4);
}
html[data-vehicly-mobile="1"] .vh-mob-fab svg { width: 26px; height: 26px; }
/* FAB volgt nav-hide */
html[data-vehicly-mobile="1"] .vh-mob-fab.is-nav-hidden {
    transform: translateY(48px);
    opacity: 0.85;
}
@keyframes vh-mob-fab-in {
    from { transform: scale(0.4) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
/* Hide FAB on print */
@media print {
    html[data-vehicly-mobile="1"] .vh-mob-fab { display: none !important; }
}

/* 14.5 Mobile Toast stack */
.vh-mob-toast-stack {
    position: fixed;
    left: 0; right: 0;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    z-index: 1080;
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
    padding: 0 12px;
    pointer-events: none;
}
.vh-mob-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(28, 25, 23, 0.96);
    color: #fff;
    font-family: var(--vh-font-body, Inter, sans-serif);
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 3px 10px rgba(0,0,0,.18);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    transform: translateY(20px);
    opacity: 0;
    transition: transform .26s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
    pointer-events: auto;
    max-width: 100%;
}
.vh-mob-toast.is-in { transform: translateY(0); opacity: 1; }
.vh-mob-toast.is-out { transform: translateY(-12px); opacity: 0; }
.vh-mob-toast-icon {
    flex-shrink: 0;
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.vh-mob-toast-icon svg { width: 100%; height: 100%; }
.vh-mob-toast--success .vh-mob-toast-icon { color: #4ade80; }
.vh-mob-toast--error   .vh-mob-toast-icon { color: #f87171; }
.vh-mob-toast--warning .vh-mob-toast-icon { color: #fbbf24; }
.vh-mob-toast--info    .vh-mob-toast-icon { color: #f2c94c; }
.vh-mob-toast-msg { flex: 1; }
.vh-mob-toast-action {
    background: rgba(242,201,76,.18);
    color: #F2C94C;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.vh-mob-toast-action:active { transform: scale(0.95); }
.vh-mob-toast-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.6);
    width: 24px; height: 24px;
    padding: 2px;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.vh-mob-toast-close svg { width: 100%; height: 100%; }
.vh-mob-toast-close:active { color: #fff; }

/* 14.6 Long-press context menu */
.vh-mob-ctx-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: background .22s ease, backdrop-filter .22s ease;
}
.vh-mob-ctx-overlay.is-open {
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.vh-mob-ctx-sheet {
    width: calc(100% - 24px);
    max-width: 420px;
    margin: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 20px 40px rgba(0,0,0,.18);
    transform: translateY(40px);
    opacity: 0;
    transition: transform .28s cubic-bezier(.2,.7,.3,1), opacity .22s ease;
}
.vh-mob-ctx-overlay.is-open .vh-mob-ctx-sheet {
    transform: translateY(0);
    opacity: 1;
}
.vh-mob-ctx-item,
.vh-mob-ctx-cancel {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    text-align: left;
    font-family: var(--vh-font-body, Inter, sans-serif);
    font-size: 16px;
    color: var(--vh-text, #1c1917);
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.vh-mob-ctx-item:active,
.vh-mob-ctx-cancel:active {
    background: rgba(0,0,0,.05);
}
.vh-mob-ctx-item svg {
    width: 20px; height: 20px;
    color: var(--vh-text-secondary, #57534e);
    flex-shrink: 0;
}
.vh-mob-ctx-cancel {
    margin-top: 4px;
    border-top: 1px solid rgba(0,0,0,.06);
    border-radius: 0 0 10px 10px;
    justify-content: center;
    font-weight: 600;
    color: var(--vh-primary-dark, #C49A22);
}

/* 14.7 Sticky section headers (inside card / list) */
html[data-vehicly-mobile="1"] .vh-mob-sticky-h {
    position: sticky;
    top: calc(52px + env(safe-area-inset-top, 0px));
    z-index: 5;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    padding: 8px 0;
    margin: 0 -2px;
}

/* 14.8 Splash → app cross-fade (purely a hook for splash overlay fade — body itself doesn't animate) */
html[data-vehicly-mobile="1"] body.vh-mob-app-entered #vhMobSplash {
    opacity: 0;
    transition: opacity .24s ease;
    pointer-events: none;
}

/* 14.9 Snap-point hint on sheet drag handle */
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box::before {
    width: 44px !important;
    height: 5px !important;
    background: #d1cfcc !important;
    border-radius: 3px !important;
    transition: background .2s ease;
}
html[data-vehicly-mobile="1"] .vh-modal-overlay.is-dragging .vh-modal-box.vh-sheet-box::before {
    background: #a8a29e !important;
}

/* Sheet snap-mode CSS hooks (filled in by mobile-sheet.js) */
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box[data-snap="peek"] { max-height: 38svh; }
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box[data-snap="half"] { max-height: 62svh; }
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box[data-snap="full"] { max-height: 92svh; }

/* Keyboard adjust — when input focused, sheet shrinks via visualViewport */
html[data-vehicly-mobile="1"] .vh-modal-box.vh-sheet-box.is-kb-open {
    max-height: var(--vh-kb-sheet-h, 60svh) !important;
}

/* 14.10 Empty-state illustration container */
html[data-vehicly-mobile="1"] .vh-mob-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    color: var(--vh-text-secondary, #57534e);
}
html[data-vehicly-mobile="1"] .vh-mob-empty svg {
    width: 96px;
    height: 96px;
    opacity: .35;
    margin-bottom: 16px;
}
html[data-vehicly-mobile="1"] .vh-mob-empty-title {
    font-family: var(--vh-font-display, Inter, sans-serif);
    font-size: 17px;
    font-weight: 600;
    color: var(--vh-text, #1c1917);
    margin: 0 0 6px;
}
html[data-vehicly-mobile="1"] .vh-mob-empty-body {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 18px;
    max-width: 280px;
}
html[data-vehicly-mobile="1"] .vh-mob-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--vh-primary, #F2C94C);
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* 14.11 Reduced motion respect for app-feel animations */
@media (prefers-reduced-motion: reduce) {
    html[data-vehicly-mobile="1"] .vh-mob-bottomnav,
    html[data-vehicly-mobile="1"] .vh-mob-fab,
    html[data-vehicly-mobile="1"] .vh-is-pressed,
    .vh-mob-toast,
    .vh-mob-ctx-sheet {
        transition: opacity .15s ease !important;
        animation: none !important;
    }
    html[data-vehicly-mobile="1"] .vh-is-pressed {
        transform: none !important;
        filter: brightness(0.95);
    }
}

/* 14.12 Optimistic save heart bounce */
@keyframes vh-mob-heart-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.35); }
    65%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
html[data-vehicly-mobile="1"] .vh-mob-heart-pop {
    animation: vh-mob-heart-pop .42s cubic-bezier(.34,1.56,.64,1) both;
}

/* 14.13 Score-ring count-up haptic tick highlight (subtle pulse on each 10) */
html[data-vehicly-mobile="1"] .score-circle.vh-mob-tick {
    box-shadow: 0 0 0 4px rgba(242,201,76,.18);
    transition: box-shadow .15s ease;
}

/* ============================================================================
   15. Global footer on mobile
   ----------------------------------------------------------------------------
   Hidden by default — fades in once user scrolls past ~80px (class flipped by
   mobile-chrome-fx.js). Avoids the "krap" feel of a dark footer being
   immediately visible on short/hero-heavy pages. Once revealed, stays
   revealed for the session.
   ============================================================================ */
html[data-vehicly-mobile="1"] .vh-global-footer {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
    will-change: opacity, transform;
}
html[data-vehicly-mobile="1"].vh-mob-scrolled .vh-global-footer {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
    html[data-vehicly-mobile="1"] .vh-global-footer {
        transition: opacity .15s ease;
        transform: none;
    }
}

/* 15.1 More breathing room on mobile — fixes the cramped feel */
html[data-vehicly-mobile="1"] .vh-footer-inner {
    padding: 3.5rem 1.5rem 2.25rem;
}
html[data-vehicly-mobile="1"] .vh-footer-top {
    gap: 2.5rem;
    padding-bottom: 2.25rem;
}
html[data-vehicly-mobile="1"] .vh-footer-brand {
    gap: .25rem;
}
html[data-vehicly-mobile="1"] .vh-footer-logo {
    margin-bottom: .5rem;
}
html[data-vehicly-mobile="1"] .vh-footer-tagline {
    line-height: 1.7;
}
html[data-vehicly-mobile="1"] .vh-footer-email {
    margin-top: 1.25rem;
}
html[data-vehicly-mobile="1"] .vh-footer-col-label {
    margin-bottom: 1.1rem;
}
html[data-vehicly-mobile="1"] .vh-footer-nav-col a {
    padding: .5rem 0;
}
html[data-vehicly-mobile="1"] .vh-footer-bottom {
    padding-top: 1.75rem;
    gap: .85rem;
}
html[data-vehicly-mobile="1"] .vh-footer-bottom-actions {
    gap: 1.25rem;
    margin-top: .25rem;
}
