/* ------------------------------------------------------------------
   AP – MOBILANPASSNING
   Designfilerna har sina stilar inline. Här ligger det som behöver
   ändras på små skärmar; !important krävs för att gå före inline-stilen.
   Selektorerna på style-attributet matchar webbläsarens normaliserade
   form ("min-height: 280px"), som både runtime och bygget skriver ut.
-------------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }

/* ---------- Header ---------- */
.ap-h-short { display: none; }

@media (max-width: 1080px) {
  .ap-h-bar { gap: 12px !important; }
}

@media (max-width: 560px) {
  .ap-h-bar { height: 64px !important; padding: 0 16px !important; }
  .ap-h-logo { height: 32px !important; }
  .ap-h-actions { gap: 8px !important; }
  .ap-h-cta { height: 40px !important; padding: 0 16px !important; font-size: 14px !important; }
  .ap-h-long { display: none; }
  .ap-h-short { display: inline; }
}

@media (max-width: 340px) {
  .ap-h-logo { height: 26px !important; }
  .ap-h-cta { padding: 0 12px !important; }
}

/* ---------- Flikrader (tjänster, orter) ---------- */
.ap-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding: 0 16px;
}
.ap-tabs::-webkit-scrollbar { display: none; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  /* Kort med fast minhöjd blir annars halvtomma i en kolumn */
  main [style*="min-height: 1"],
  main [style*="min-height: 2"],
  main [style*="min-height: 3"] { min-height: 0 !important; }

  /* Stora knappar staplas i full bredd */
  .ap-btnrow { width: 100%; flex-direction: column; }
  .ap-btnrow > a { width: 100%; padding: 0 20px !important; }
  main a[style*="border-radius: 999px"][style*="height: 58px"],
  main a[style*="border-radius: 999px"][style*="height: 60px"] {
    width: 100%;
    justify-content: center !important;
    padding: 0 20px !important;
    height: 54px !important;
    font-size: 16px !important;
  }

  /* Startsidans hero: lägre minhöjd, mindre luft */
  main > section:first-child[style*="min-height: min(88vh"] { min-height: 0 !important; }

  /* Kundlogotyper: mindre band */
  section[aria-label="Kunder"] li { width: 120px !important; margin-right: 18px !important; }
  section[aria-label="Kunder"] li > span { height: 56px !important; }
}

/* ---------- Cookie-ruta ---------- */
@media (max-width: 640px) {
  .ap-cookie {
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    max-width: none !important;
    border-radius: 18px 18px 0 0 !important;
    border-width: 1px 0 0 !important;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom)) !important;
    font-size: 13.5px !important; line-height: 1.45 !important;
  }
  .ap-cookie p { margin-bottom: 12px !important; }
  .ap-cookie button { flex: 1 1 0; height: 42px !important; padding: 0 12px !important; font-size: 14px !important; }
}
