/*
 * dropio-components.css — Brand-componenten verplaatst uit inline <style>-blokken
 * (Batch 3 M6). Deze CSS is non-critical: laad na critical-inline + tokens +
 * tailwind + system. Inhoud uit:
 *   - templates/_base.html (button/chip/pill/input/toggle/icon-card/etc.)
 *   - templates/_base.html (cookie banner desktop pos)
 *   - templates/homepage.html (showcase-card drops-stage)
 *   - templates/product.html (alert-modal row)
 */

/* ── Tailwind utility-alikes ── */
.text-brand { color: var(--brand); }
.bg-brand { background: var(--brand); }
.bg-brand-soft { background: var(--brand-soft); }
.border-brand { border-color: var(--brand); }
.bg-cream { background: var(--cream); }
.bg-warm { background: var(--warm); }

/* ── Buttons ──
   Canonical base voor .btn én .ds-btn (Batch 4-3 unification). De class-namen
   blijven naast elkaar bestaan (geen template-migratie) maar de CSS-regels
   zijn identiek zodat homepage (.btn) en dashboard (.ds-btn) visueel matchen.
   Spec: height 44, padding 0 18px, radius 14, weight 600, Poppins display,
   letter-spacing -0.005em, transition 150ms ease.
*/
.btn,
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.005em;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease,
              color 150ms ease,
              border-color 150ms ease,
              box-shadow 150ms ease,
              transform 100ms ease;
}
.btn:active,
.ds-btn:active { transform: translateY(1px); }

.btn-primary,
.ds-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-orange, 0 8px 24px rgba(255,106,0,0.28));
}
.btn-primary:hover,
.ds-btn-primary:hover { background: #E55E00; }

.btn-secondary,
.ds-btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover,
.ds-btn-secondary:hover { background: var(--cream); }

.btn-ghost,
.ds-btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 0;
}
.btn-ghost:hover,
.ds-btn-ghost:hover { background: var(--brand-soft); }

.btn-link { background: transparent; color: var(--ink); padding: 0 4px; min-height: 44px; }
.btn-link:hover { color: var(--brand); background: transparent; }

.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 16px; }

/* Small variant gebruikt door dashboard topbar acties.
   Spec: height 36, padding 0 12px, font-size 14px. */
.ds-btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* Icon-only variant overrides — width/height/padding/radius worden in
   dropio-system.css gezet; deze regel zorgt dat de unified .ds-btn-base
   die properties niet alsnog overschrijft (components.css laadt later).
   .ds-btn-icon krijgt zo de juiste 44×44 square shape. */
.ds-btn.ds-btn-icon {
  width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  font-size: 14px;
}
@media (min-width: 769px) {
  .ds-btn.ds-btn-icon { width: 36px; height: 36px; min-height: 36px; border-radius: 8px; }
}

/* ── Chips ── */
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 9999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.chip--neutral { background: var(--warm); color: var(--muted); }
.chip--ok { background: #D1FAE5; color: #047857; }
.chip--bad { background: #FEE2E2; color: #B91C1C; }
.chip--accent { background: #FFE7D0; color: #B8500B; }

/* ── Pills (range/period switcher) ── */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 9999px; background: transparent; color: var(--muted); transition: background .15s, color .15s; cursor: pointer; border: none; }
.pill:hover { background: var(--warm); }
.pill--active { background: var(--ink); color: #fff; }
.pill--active:hover { background: var(--ink); color: #fff; }

/* ── Inputs ── */
.input { width: 100%; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 12px 16px; color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,106,0,.15); }
.input.pl-7  { padding-left: 1.75rem; }
.input.pl-8  { padding-left: 2rem; }
.input.pl-10 { padding-left: 2.5rem; }
.input.pl-12 { padding-left: 3rem; }

/* iOS Safari zoomt automatisch in op input < 16px. Bump font-size op mobile
   zodat we die zoom voorkomen (betere UX dan user-scalable=no). */
@media (max-width: 640px) {
  input.input,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Mobile heading-scale: kleinere h1/h2 voor betere readability op iPhone.
     Tailwind text-3xl/4xl/5xl + hardcoded text-[40px] worden hier overruled —
     desktop-md+ blijft via Tailwind responsive werken. */
  .heading-display { font-size: 28px !important; line-height: 1.15 !important; }
  h1.heading-display { font-size: 28px !important; }
  h1[class*="text-[40px]"], h1[class*="text-3xl"] { font-size: 28px !important; }
  h2[class*="text-3xl"], h2[class*="text-4xl"] { font-size: 22px !important; line-height: 1.25 !important; }
  h2.font-display.font-bold { font-size: 22px !important; line-height: 1.25 !important; }
  h3[class*="text-xl"], h3.font-display { font-size: 17px !important; }
}

/* ── Card, price-tabular ── */
.card-hover:hover { box-shadow: 0 8px 24px rgba(13,20,33,.06); transform: translateY(-2px); }
.price { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── Headings hierarchy ── */
h2.font-display { font-weight: 700; letter-spacing: -.018em; }
h3.font-display { font-weight: 600; letter-spacing: -.01em; }

/* ── Nav-links ── */
.nav-link { color: var(--ink); font-size: 15px; padding: 8px 14px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.nav-link:hover { color: var(--brand); }
.nav-link.is-active { color: var(--brand); }

/* ── Flash messages ── */
.flash { display: flex; align-items: center; gap: .5rem; background: var(--brand-soft); color: #7C2D12; padding: 12px 16px; border-radius: 12px; font-size: 14px; }

/* ── Details summary ── */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Toggle switch ──
   Canonical 44×24 oranje-on-state met 20×20 knob (2px inset).
   Visueel gedeeld met .dash-toggle-slider (dropio-system.css) en .ds-switch
   zodat een toggle op /account, /dashboard of in een product-sidebar
   identiek oogt. Class-namen blijven naast elkaar bestaan (geen template-
   migratie); de CSS-regels zijn de bron-van-waarheid. */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 9999px;
  transition: background 200ms ease;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 200ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--brand); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

.icon-card { width: 48px; height: 48px; background: #fff; border: 1px solid var(--border); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: 0 2px 6px rgba(13,20,33,.04); }

/* ── A11y focus-visible ── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.ds-btn:focus-visible,
button.btn:focus-visible,
.pill:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.card:has(a:focus-visible),
.card:has(button:focus-visible) {
  box-shadow: 0 0 0 2px var(--brand);
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff;
  padding: 8px 16px; border-radius: 0 0 8px 0;
  z-index: 1000; font-weight: 600;
}
.skip-link:focus { left: 0; }

.text-body-strong { color: var(--ink-2, #1F2937); }
.text-body { color: var(--muted); }

/* "Installeer als app" knoppen alleen relevant op mobile */
@media (min-width: 768px) {
  [data-pwa-install] { display: none !important; }
}

.logo-lockup { height: 36px; width: auto; }
.logo-lockup--lg { height: 44px; }
.logo-flame { height: 28px; width: auto; }

.accent-gradient { background: linear-gradient(135deg, #FF6A00 0%, #FFA633 100%); }
.glow-accent { box-shadow: 0 0 0 4px rgba(255,166,51,.18); }

section.border-t.border-border,
section.border-y.border-border { border-color: #E0DACE; }
footer { border-top-color: rgba(255,255,255,.08); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0;
           margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
           white-space: nowrap; border: 0; }

/* ── Cookie banner desktop position (uit _base.html inline <style>) ── */
@media (min-width: 768px) {
  #dropio-cookie-banner { bottom: 1.5rem !important; }
}
body.has-cookie-banner main {
  padding-bottom: 0;
}
@media (max-width: 767px) {
  body.has-cookie-banner main {
    padding-bottom: 70px;
  }
}

/* ── Drops stage (homepage.html showcase) ── */
/* Stage = animatie-podium. overflow:hidden is KRITIEK — zo kunnen
   absoluut-gepositioneerde lanen niet ontsnappen naar boven. */
.drops-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  height: 460px;
  background: linear-gradient(180deg, #FFF7EE 0%, #FBF9F7 100%);
  border: 1px solid var(--border, #E5E7EB);
  isolation: isolate;
}
@media (min-width: 640px) { .drops-stage { height: 520px; } }
@media (min-width: 1024px) { .drops-stage { height: 600px; } }

.drops-lane {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  will-change: transform;
}

.drops-lane--a {
  left: 16px;
  right: 16px;
  animation: dropsFallDown 36s linear infinite;
}
.drops-lane--b { display: none; }

@media (min-width: 640px) {
  .drops-lane--a {
    left: 14px;
    right: auto;
    width: calc(50% - 21px);
  }
  .drops-lane--b {
    display: flex;
    right: 14px;
    width: calc(50% - 21px);
    animation: dropsFallDown 44s linear infinite;
    animation-delay: -18s;
  }
}

@keyframes dropsFallDown {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}

.drops-stage:hover .drops-lane,
.drops-stage:focus-within .drops-lane {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .drops-lane { animation: none !important; transform: translateY(-25%); }
}

.drops-stage::before,
.drops-stage::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 72px;
  pointer-events: none;
  z-index: 5;
}
.drops-stage::before {
  top: 0;
  background: linear-gradient(180deg, #FFF7EE 0%, rgba(255,247,238,0) 100%);
}
.drops-stage::after {
  bottom: 0;
  background: linear-gradient(0deg, #FBF9F7 0%, rgba(251,249,247,0) 100%);
}

.drop-card {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px -4px rgba(13, 27, 42, 0.10);
  position: relative;
  min-height: 64px;
}
.drop-card__media {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #F4F1EC;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}
.drop-card__icon {
  color: var(--brand, #FF6A00);
  font-size: 18px;
}
.drop-card__body { min-width: 0; flex: 1; }
.drop-card__name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink, #0D1B2A);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}
.drop-card__prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}
.drop-card__was {
  font-size: 11px;
  color: var(--muted-2, #9CA3AF);
  text-decoration: line-through;
}
.drop-card__now {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #0D1B2A);
}
.drop-card__badge {
  flex-shrink: 0;
  background: var(--brand, #FF6A00);
  color: #fff;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.01em;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px -2px rgba(255, 106, 0, 0.45);
}
@media (min-width: 768px) {
  .drop-card { padding: 12px 14px; gap: 12px; border-radius: 16px; min-height: 72px; }
  .drop-card__media { width: 52px; height: 52px; border-radius: 12px; }
  .drop-card__icon { font-size: 22px; }
  .drop-card__name { font-size: 13.5px; }
  .drop-card__now { font-size: 15px; }
  .drop-card__badge { font-size: 12px; padding: 4px 10px; }
}

/* ── Drop-card tilt (speelse kanteling) ──────────────────────────
   Elke kaart krijgt een rotatie volgens een herhalend 6-patroon.
   De lane bevat 12 cards (set 2× gerenderd voor naadloze loop)
   dus 6n herhaalt precies twee keer. translateY-animatie van
   .drops-lane en rotate van .drop-card werken onafhankelijk —
   geen transform-conflict. Lane B krijgt gespiegelde hoeken
   zodat de twee kolommen niet identiek aanvoelen. */
.drop-card {
  --tilt: 0deg;
  transform: rotate(var(--tilt));
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.drops-lane--a .drop-card:nth-child(6n+1) { --tilt: -2.6deg; }
.drops-lane--a .drop-card:nth-child(6n+2) { --tilt:  1.8deg; }
.drops-lane--a .drop-card:nth-child(6n+3) { --tilt: -1.2deg; }
.drops-lane--a .drop-card:nth-child(6n+4) { --tilt:  2.4deg; }
.drops-lane--a .drop-card:nth-child(6n+5) { --tilt: -2.0deg; }
.drops-lane--a .drop-card:nth-child(6n)   { --tilt:  1.4deg; }

.drops-lane--b .drop-card:nth-child(6n+1) { --tilt:  2.2deg; }
.drops-lane--b .drop-card:nth-child(6n+2) { --tilt: -1.6deg; }
.drops-lane--b .drop-card:nth-child(6n+3) { --tilt:  2.8deg; }
.drops-lane--b .drop-card:nth-child(6n+4) { --tilt: -2.4deg; }
.drops-lane--b .drop-card:nth-child(6n+5) { --tilt:  1.5deg; }
.drops-lane--b .drop-card:nth-child(6n)   { --tilt: -1.9deg; }

.drop-card:hover,
.drop-card:focus-within {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 8px 24px -6px rgba(13, 27, 42, 0.18);
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .drop-card { transition: none; }
}

/* ── Alert modal row (product.html inline <style>) ── */
.alert-modal__row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 12px 0;
  background: var(--warm); border-radius: 10px;
  cursor: pointer; user-select: none;
  font-size: 14px;
}
.alert-modal__row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--brand);
}
