/* ============================================================
   DrivOlution — enhance.css
   Progressieve verbeteringen bovenop styles.css + redesign.css.
   Voegt alleen nieuwe regels toe, bewerkt niets bestaands.
   Licht + donker consistent, nette focus-states, performant.
   Werkkopie, niet publiceren.
   ============================================================ */

/* ------------------------------------------------------------
   1. Sticky "shrink"-header
   Compactere, subtiel opgetilde header zodra er gescrold wordt.
   Werkt via .site-header.is-shrink of via body.is-scrolled.
   ------------------------------------------------------------ */
.site-header {
  transition: min-height .28s ease, box-shadow .28s ease,
              background-color .28s ease, border-color .28s ease;
  will-change: min-height;
}
.site-header .container {
  transition: min-height .28s ease;
}
.site-header .logo svg,
.site-header .logo img {
  transition: width .28s ease, height .28s ease;
}

/* De twee triggers delen exact dezelfde opmaak */
.site-header.is-shrink,
body.is-scrolled .site-header {
  box-shadow: 0 12px 30px -20px rgba(20, 20, 60, .28);
  border-bottom-color: rgba(0, 0, 0, .08);
}
.site-header.is-shrink .container,
body.is-scrolled .site-header .container {
  min-height: 68px;
}
.site-header.is-shrink .logo svg,
.site-header.is-shrink .logo img,
body.is-scrolled .site-header .logo svg,
body.is-scrolled .site-header .logo img {
  width: 38px;
  height: 38px;
}

/* ------------------------------------------------------------
   2. Cookie-consent balk (privacy-first)
   Vast paneel links onderaan. Wit, rustig, past bij de huisstijl.
   Standaard verborgen: het script toont hem alleen bij geen keuze.
   ------------------------------------------------------------ */
.cookiebar {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 70;
  width: min(380px, calc(100vw - 40px));
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft), 0 2px 8px rgba(0, 0, 0, .06);
  padding: 22px 24px;
  animation: cookiebar-in .32s ease both;
}
.cookiebar[hidden] { display: none; }

@keyframes cookiebar-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cookiebar h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.cookiebar p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 18px;
}
.cookiebar p a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookiebar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cookiebar__actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  padding: 12px 18px;
  font-size: 15px;
}
/* Secundaire keuze (alleen noodzakelijk) rustig en licht */
.cookiebar .btn--ghost {
  background: var(--grey);
  color: var(--ink);
  border-color: var(--grey);
}
.cookiebar .btn--ghost:hover {
  background: var(--grey-2);
  border-color: var(--grey-2);
}

/* Mobiel: volledige breedte onderaan */
@media (max-width: 640px) {
  .cookiebar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 20px 20px;
  }
  .cookiebar__actions { flex-direction: column-reverse; }
  .cookiebar__actions .btn { width: 100%; }
}

/* Als de sticky mobiele actiebalk aanwezig is, cookiebar erboven tillen */
@media (max-width: 900px) {
  .cookiebar { bottom: 86px; }
}

/* ------------------------------------------------------------
   3. Utility: verberg op mobiel
   Zet op de topbar-openingstijden-span.
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .u-hide-mobile { display: none !important; }
}

/* ------------------------------------------------------------
   4. Scroll-offset voor ankers onder de sticky header
   ------------------------------------------------------------ */
html { scroll-padding-top: 120px; }

/* ------------------------------------------------------------
   5. Polish: toegankelijke focus-states + reduced motion
   ------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}
/* Vormvaste focus voor pill-knoppen */
.btn:focus-visible {
  outline-offset: 4px;
}
/* Verwijder default outline alleen waar we een net alternatief geven */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* shrink-header: laat de header echt krimpen bij scrollen (overschrijft container min-height) */
.site-header .container { transition: min-height .25s ease; }
body.is-scrolled .site-header .container { min-height: 66px; }
