/* Sticky call / WhatsApp / quote bar, phones only.
   Someone reading a service page on a phone should never have to scroll back up to contact us. */
.kc-bar{display:none}

@media (max-width:760px){
  .kc-bar{
    display:grid;grid-template-columns:1fr 1fr 1fr;gap:1px;
    position:fixed;left:0;right:0;bottom:0;z-index:60;
    background:#d9dde2;
    padding-bottom:env(safe-area-inset-bottom,0);
    box-shadow:0 -2px 14px rgba(0,0,0,.13);
    transform:translateY(110%);transition:transform .22s ease-out
  }
  .kc-bar.on{transform:none}
  .kc-bar a{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-height:58px;background:#fff;text-decoration:none;color:#111;
    font:700 12px/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.01em
  }
  .kc-bar a svg{width:20px;height:20px;display:block}
  .kc-bar .kc-bar-quote{background:#c4161c;color:#fff}
  .kc-bar .kc-bar-wa{color:#128c7e}
  .kc-bar a:active{filter:brightness(.94)}

  /* Keep the bar off the last of the page. The sticky bar already carries
     WhatsApp as its middle slot — a second floating green bubble just overlaps
     body text ("vehicle rather than guess from the badge" on car-servicing was
     being cut off by the bubble at the top of the page before the sticky bar
     had scrolled into view). Hide it entirely on phones. */
  body{padding-bottom:62px}
  .whatsapp-float,.wa-float{display:none!important}
}
@media (prefers-reduced-motion:reduce){
  .kc-bar{transition:none}
}

/* Mobile safety net for inline two-column grids.

   A number of sections set grid-template-columns in a style attribute. An inline style outranks
   every stylesheet rule, including a media query, so those sections stayed two columns on a phone
   and the right-hand column was pushed off the screen -- where body{overflow-x:hidden} hid it
   rather than letting it scroll. On /about-us that silently removed the whole KITH Bodyworks
   block from a 360px screen. These rules are deliberately !important: nothing weaker can beat an
   inline style, and this file is loaded by every page on the site. */
@media (max-width:768px){
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:3fr 2fr"],
  [style*="grid-template-columns: 3fr 2fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"]{
    grid-template-columns:1fr !important;
    gap:2rem !important
  }
}

/* WhatsApp in the header, on every page. It goes in this file because every page loads it, and
   the header markup differs slightly between the homepage and the generated pages. Green, so it
   reads as WhatsApp at a glance rather than as another grey link. */
.header-wa{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 14px;border-radius:999px;
  background:#25D366;color:#073b22;font-weight:700;font-size:14px;
  text-decoration:none;white-space:nowrap;line-height:1;
  transition:background .15s,transform .15s
}
.header-wa:hover{background:#1fb855;color:#052b18}
.header-wa:active{transform:translateY(1px)}
.header-wa svg{flex:none}
.header-wa:focus-visible{outline:3px solid #0b7a46;outline-offset:2px}

/* Tight headers: keep the icon, drop the word before anything else has to give. */
@media (max-width:1100px){
  .header-wa span{display:none}
  .header-wa{padding:8px 10px}
}
/* On a phone the sticky bar at the bottom already carries WhatsApp, so the header one would be
   the third copy on one screen. */
@media (max-width:760px){
  .header-wa{display:none}
}

/* Same iOS default: the call bar's links must state their own colour, or iOS paints them
   in its own link blue. */
.kc-bar a { color: var(--ink, #15151a); }
.kc-bar .kc-bar-wa { color: #0b7a53; }
.kc-bar .kc-bar-quote { color: #fff; }
.header-wa, .header-wa:hover { color: #fff; }

/* ============================================
   STICKY REG BAR — injected by regbar.js on service/location pages.
   It sits right under the header so the first thing a phone reader sees is:
   "put your reg in, get a price". Homepage already has this in its hero so
   regbar.js opts out there. Desktop ignores the whole thing (JS exits).
   ============================================ */
/* .kith-regbar is appended inside the fixed header by regbar.js, so it inherits the
   header's fixed positioning — always visible below the logo row. */
.kith-regbar{
  display:flex;align-items:stretch;gap:8px;
  padding:9px 12px 10px;
  background:#0d0f14;
  border-top:1px solid #1f232b;
  width:100%;
  box-sizing:border-box;
}
.kith-regbar-plate{
  flex:1 1 auto;min-width:0;
  display:flex;align-items:stretch;
  border:2px solid #0b0c10;border-radius:7px;overflow:hidden;
  background:#ffd600;box-shadow:0 1px 0 rgba(255,255,255,.05);
}
.kith-regbar-uk{
  background:#0b3d91;color:#fff;font-weight:800;font-size:11px;
  display:flex;align-items:flex-end;justify-content:center;
  padding:0 6px 5px;min-width:30px;letter-spacing:.02em;
}
.kith-regbar-plate input{
  flex:1 1 auto;min-width:0;
  border:0;background:transparent;
  font:800 19px/1 'Arial Black','Arial',sans-serif;
  letter-spacing:.05em;text-transform:uppercase;
  padding:10px 8px;color:#111;text-align:center;
}
.kith-regbar-plate input::placeholder{color:rgba(0,0,0,.4)}
.kith-regbar-plate input:focus{outline:none;}
.kith-regbar-plate:focus-within{box-shadow:0 0 0 3px rgba(255,214,0,.35)}
.kith-regbar-go{
  flex:0 0 auto;
  background:#dc2626;color:#fff;font-weight:800;
  border:0;border-radius:7px;
  padding:0 14px;font-size:14px;
  cursor:pointer;white-space:nowrap;
  letter-spacing:.01em;
}
.kith-regbar-go:active{background:#b91c1c}
@media (max-width:380px){
  .kith-regbar{padding:8px 10px;gap:6px}
  .kith-regbar-plate input{font-size:16px;padding:9px 6px}
  .kith-regbar-go{padding:0 11px;font-size:13px}
}

/* One WhatsApp button, bottom right. Replaces the full-width bar of two or three actions, which
   competed with the quote funnel now sitting at the top of every page. The original rules below
   set a three-column grid and a 58px min-height on the anchor, so these have to undo both rather
   than only reposition the bar. */
@media (max-width:760px){
  .kc-bar{
    display:block; grid-template-columns:none; gap:0;
    left:auto; right:max(14px, env(safe-area-inset-right,0px));
    bottom:calc(14px + env(safe-area-inset-bottom,0px));
    width:56px; background:none; box-shadow:none; padding:0;
  }
  .kc-bar a.kc-bar-wa{
    width:56px; height:56px; min-height:0; border-radius:50%;
    display:flex; align-items:center; justify-content:center; gap:0;
    background:#25d366; color:#fff; box-shadow:0 8px 24px rgba(0,0,0,.28);
  }
  .kc-bar a.kc-bar-wa svg{width:28px;height:28px}
  .kc-bar a.kc-bar-wa span{display:none}
}
