/*!
 * MoverSelect — Mobile-only stylesheet
 * Voor schermen <768px: drawer-menu, sticky bottom-CTA, swipe-friendly cards,
 * compactere typografie, 1-kolom stack, hide non-essential UI.
 */

/* ============================================================
   Breakpoint guard — alles binnen <768px
   ============================================================ */
@media (max-width: 767.98px) {

  /* ----------------------------------------------------------
     Hamburger drawer override / extra polish
     ---------------------------------------------------------- */
  body.drawer-open {
    overflow: hidden;
    -webkit-overflow-scrolling: auto;
  }
  .drawer {
    width: min(86vw, 340px);
    padding-top: 18px;
    padding-bottom: 96px; /* ruimte voor bottom-cta */
  }
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
  }
  .drawer-head .brand { font-size: 1.2rem; }
  .drawer-close {
    width: 40px; height: 40px;
    border: 0;
    background: var(--bg-2);
    border-radius: var(--r-md);
    color: var(--ink);
    font-size: 1.4rem; line-height: 1;
    cursor: pointer;
  }
  .drawer-section {
    padding: 8px 0 14px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
  }
  .drawer-section:first-of-type { border-top: 0; margin-top: 0; }
  .drawer-section-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-3);
    padding: 0 12px 6px;
  }

  /* ----------------------------------------------------------
     Sticky bottom CTA bar (Bel/Mail/WhatsApp pattern)
     ---------------------------------------------------------- */
  .bottom-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -10px rgba(15, 23, 42, .15);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bottom-cta a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 8px 6px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: .76rem;
    font-weight: 600;
    transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
  }
  .bottom-cta a:active { background: var(--bg-2); }
  .bottom-cta a .icon { font-size: 1.25rem; line-height: 1; }
  .bottom-cta .cta-call    { color: var(--brand); }
  .bottom-cta .cta-mail    { color: var(--ink); }
  .bottom-cta .cta-whatsapp { color: #16a34a; }
  .bottom-cta .cta-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
  }
  .bottom-cta .cta-primary:active { background: var(--accent-3); }

  /* page padding zodat bottom-cta niets overdekt */
  body.has-bottom-cta { padding-bottom: 64px; }
  body.has-bottom-cta .site-footer { margin-bottom: 60px; }

  /* ----------------------------------------------------------
     Touch-swipe friendly cards (horizontal scroll rails)
     ---------------------------------------------------------- */
  .swipe-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    padding: 4px 16px 14px;
    margin: 0 -16px;
    scrollbar-width: none;
  }
  .swipe-rail::-webkit-scrollbar { display: none; }
  .swipe-rail > * {
    flex: 0 0 82%;
    max-width: 320px;
    scroll-snap-align: start;
  }
  .swipe-rail > .mover-card,
  .swipe-rail > .result-card,
  .swipe-rail > .card {
    border-radius: var(--r-lg);
  }
  .swipe-hint {
    text-align: center;
    color: var(--ink-3);
    font-size: .78rem;
    margin-top: 6px;
  }
  .swipe-hint::after { content: ' →'; }

  /* ----------------------------------------------------------
     Reduced font-sizes
     ---------------------------------------------------------- */
  body { font-size: 15px; line-height: 1.55; }
  h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); letter-spacing: -.025em; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.08rem; }
  h4 { font-size: 1rem; }

  .hero h1 { font-size: clamp(1.7rem, 7.5vw, 2.3rem); margin-bottom: 12px; }
  .hero p  { font-size: .98rem; margin-bottom: 22px; }
  .hero    { padding: 44px 0 32px; }
  .stat-num { font-size: 1.9rem; }

  /* ----------------------------------------------------------
     Stack 2-column → 1-column layouts
     ---------------------------------------------------------- */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; gap: 14px; }
  .search-row { grid-template-columns: 1fr !important; }
  .concept-grid,
  .stats-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .mover-grid { grid-template-columns: 1fr !important; gap: 12px; }

  .flex.flex-row-mobile-stack { flex-direction: column; align-items: stretch; }
  .cta-buttons { flex-direction: column; align-items: stretch; gap: 10px; }
  .cta-buttons a, .cta-buttons .btn { width: 100%; }

  /* ----------------------------------------------------------
     Form polish — bigger touch areas
     ---------------------------------------------------------- */
  .field input,
  .field select,
  .field textarea,
  .input, .select, .textarea {
    font-size: 16px;            /* voorkomt iOS zoom bij focus */
    padding: 14px 14px;
    min-height: 48px;
    border-radius: 12px;
  }
  .btn, .btn-search {
    width: 100%;
    min-height: 50px;
    font-size: 1rem;
    padding: 14px 18px;
  }
  .search-card { padding: 16px; border-radius: 16px; }
  .search-card .field:last-of-type label { display: none; }

  /* ----------------------------------------------------------
     Result-card — mobile compact, full-width tap
     ---------------------------------------------------------- */
  .result-card {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 8px;
    border-radius: var(--r-lg);
  }
  .result-card .price {
    font-size: 1.05rem;
    text-align: left;
  }
  .result-card .price small { display: inline; margin-left: 4px; }
  .result-card .badges { gap: 5px; }
  .result-card.is-top::before {
    top: -8px; left: 14px;
    font-size: .68rem;
    padding: 3px 9px;
  }

  /* ----------------------------------------------------------
     Tabs — full width scroll, hide labels overflow
     ---------------------------------------------------------- */
  .tabs {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
    gap: 0;
  }
  .tab { padding: 11px 14px; font-size: .9rem; }

  /* ----------------------------------------------------------
     Tables — horizontale scroll + sticky 1e kolom
     ---------------------------------------------------------- */
  .table-wrap {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .table th, .table td { padding: 10px 12px; font-size: .85rem; }
  .table th:first-child,
  .table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }
  .table th:first-child { background: var(--bg-2); }

  /* ----------------------------------------------------------
     Modal — full-bleed sheet from bottom
     ---------------------------------------------------------- */
  .modal {
    top: auto; left: 0;
    bottom: 0;
    transform: translate(0, 100%);
    width: 100%;
    max-height: 90vh;
    border-radius: 18px 18px 0 0;
  }
  .modal.is-open { transform: translate(0, 0); }
  .modal-head { padding: 16px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 14px 16px; flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }

  /* sleep-handle */
  .modal::before {
    content: '';
    display: block;
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: var(--line-2);
    margin: 8px auto -2px;
  }

  /* ----------------------------------------------------------
     Toast — wider en lager
     ---------------------------------------------------------- */
  .toast {
    left: 16px;
    right: 16px;
    transform: translateY(20px);
    bottom: 76px; /* boven bottom-cta */
    width: auto;
    max-width: none;
    font-size: .92rem;
  }
  .toast.is-visible { transform: translateY(0); }

  /* ----------------------------------------------------------
     Hide non-essential UI
     ---------------------------------------------------------- */
  .hide-on-mobile,
  .desktop-only { display: none !important; }
  .show-on-mobile,
  .mobile-only { display: block !important; }
  .show-on-mobile.flex,
  .mobile-only.flex { display: flex !important; }

  /* Decoratie vereenvoudigen */
  .hero::after { display: none; }
  .hero::before { width: 380px; height: 380px; top: -80px; }

  /* Footer compact */
  .site-footer { padding: 24px 0 28px; font-size: .82rem; }
  .site-footer .container { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-footer a { margin-left: 0; margin-right: 14px; }

  /* Country pills compact */
  .cbar { gap: 6px; }
  .cbar-pill { font-size: .74rem; padding: 4px 10px; }

  /* ----------------------------------------------------------
     Long-press / active highlight feedback
     ---------------------------------------------------------- */
  .card:active,
  .mover-card:active,
  .result-card:active {
    transform: scale(.985);
    transition: transform .08s var(--ease);
  }

  /* ----------------------------------------------------------
     Reduced motion respect
     ---------------------------------------------------------- */
  @media (prefers-reduced-motion: reduce) {
    .swipe-rail { scroll-snap-type: none; }
    .card:active, .mover-card:active, .result-card:active { transform: none; }
  }
}

/* ============================================================
   Bottom-CTA dark-mode polish
   ============================================================ */
@media (max-width: 767.98px) and (prefers-color-scheme: dark) {
  .bottom-cta {
    background: var(--line);
  }
  .bottom-cta a {
    background: var(--bg-2);
    color: var(--ink);
  }
  .bottom-cta a:active { background: var(--bg-3); }
  .table th:first-child,
  .table td:first-child { background: var(--bg-2); box-shadow: 1px 0 0 var(--line-2); }
}

/* MS-BRAND-KRIMPT-20260928 — het merkblok was 319px breed in een kolom van ~272px, waardoor de
   pagina op een 320px-scherm 559px werd en de telefoon alles uitzoomde. De naam schaalt nu mee. */
@media (max-width:480px){
  .ms-brand{
    font-size:clamp(1rem,4.6vw,1.4rem)!important;
    min-width:0!important; max-width:100%!important;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  .ms-container,.ms-container>*{ min-width:0!important; max-width:100%!important; }
  html,body{ max-width:100%; overflow-x:clip; }
}
