/* ==========================================================================
   Just Design Loops — Zoekfunctie Stijlen (css/zoeken.css)
   Semantische tokens uit css/tokens.css & css/subpagina.css.
   100% CSP-veilig: style-src 'self' (geen inline stijlen).
   ========================================================================== */

/* ---------- 1. Zoeksectie & Formulier ---------- */
.zoek-sectie {
  margin-bottom: var(--ruimte-l);
}

.zoek-formulier {
  width: 100%;
  margin-bottom: var(--ruimte-m);
}

.zoek-veld-omhulsel {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-m);
  transition: border-color var(--duur-micro) var(--ease-uit),
              box-shadow var(--duur-micro) var(--ease-uit),
              background-color var(--duur-micro) var(--ease-uit);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.zoek-veld-omhulsel:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent),
              inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.zoek-icoon {
  position: absolute;
  left: var(--ruimte-s);
  width: 22px;
  height: 22px;
  color: var(--kleur-tekst-zacht);
  pointer-events: none;
  flex-shrink: 0;
  transition: color var(--duur-micro) var(--ease-uit);
}

.zoek-veld-omhulsel:focus-within .zoek-icoon {
  color: var(--accent);
}

.zoek-invoer {
  width: 100%;
  height: 56px;
  padding: 0 88px 0 52px;
  font-family: var(--font-tekst);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 400;
  color: var(--kleur-tekst);
  background: transparent;
  border: none;
  outline: none;
  box-sizing: border-box;
}

.zoek-invoer::placeholder {
  color: var(--kleur-placeholder);
  opacity: var(--opacity-placeholder);
}

/* Verberg standaard native zoekannulatieknop in WebKit om onze eigen tactiele knop te tonen */
.zoek-invoer::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Wissen knop */
.zoek-wissen {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--kleur-tekst-zacht);
  background: var(--kleur-vlak-2);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-rond);
  cursor: pointer;
  transition: all var(--duur-micro) var(--ease-uit);
  user-select: none;
}

.zoek-wissen:hover {
  color: var(--kleur-tekst);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, var(--kleur-vlak-2));
}

.zoek-wissen:active {
  transform: translateY(-50%) scale(0.92);
}

.zoek-wissen[hidden] {
  display: none !important;
}

/* Sneltoets hint badge */
.zoek-sneltoets {
  position: absolute;
  right: var(--ruimte-s);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.zoek-sneltoets kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--kleur-tekst-zacht);
  background: var(--kleur-vlak-2);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 0 var(--kleur-rand);
  user-select: none;
}

.zoek-veld-omhulsel:focus-within .zoek-sneltoets kbd {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--kleur-rand));
}

/* No-JS verzendknop */
.zoek-verzend-knop {
  margin-top: var(--ruimte-s);
}

/* ---------- 2. Statusbalk & Snelle Suggesties ---------- */
.zoek-status-balk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ruimte-s);
  margin-bottom: var(--ruimte-l);
  padding: var(--ruimte-xs) 0;
  border-bottom: 1px solid var(--kleur-rand);
}

.zoek-status-tekst {
  display: inline-flex;
  align-items: center;
  gap: var(--ruimte-xs);
  font-family: var(--font-mono);
  font-size: var(--tekst-xs);
  color: var(--kleur-tekst-zacht);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.zoek-status-stip {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-rond);
  background: var(--kleur-stip);
  box-shadow: 0 0 6px var(--kleur-stip);
  flex-shrink: 0;
}

.zoek-snelle-termen {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ruimte-xs);
}

.zoek-snelle-label {
  font-family: var(--font-mono);
  font-size: var(--tekst-xs);
  color: var(--kleur-tekst-zacht);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.zoek-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--kleur-tekst-zacht);
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-rond);
  cursor: pointer;
  user-select: none;
  transition: all var(--duur-micro) var(--ease-uit);
}

.zoek-chip:hover {
  color: var(--kleur-tekst);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--kleur-vlak));
}

.zoek-chip:active {
  transform: translateY(1px);
}

.zoek-chip.is-actief {
  color: var(--kleur-tekst);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, var(--kleur-vlak));
  font-weight: 700;
}

/* ---------- 3. Resultatenlijst & Kaarten ---------- */
.zoek-resultaten-container {
  width: 100%;
}

.zoek-lijst {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ruimte-m);
}

.zoek-item {
  display: block;
}

.zoek-item[hidden] {
  display: none !important;
}

.zoek-kaart {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--ruimte-m);
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-m);
  transition: transform var(--duur-micro) var(--ease-uit),
              border-color var(--duur-micro) var(--ease-uit),
              box-shadow var(--duur-micro) var(--ease-uit);
}

.zoek-kaart:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--kleur-rand));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.zoek-kaart:active {
  transform: translateY(0) scale(0.995);
}

.zoek-kaart:focus-within {
  border-color: var(--accent);
}

.zoek-kaart-kop {
  display: flex;
  flex-direction: column;
  gap: var(--ruimte-xxs);
  margin-bottom: var(--ruimte-s);
}

.zoek-kaart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ruimte-s);
}

.zoek-pad {
  font-family: var(--font-mono);
  font-size: var(--tekst-xs);
  color: var(--accent);
  letter-spacing: 0.06em;
}

.zoek-kopjes-teller {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--kleur-tekst-zacht);
  background: var(--kleur-vlak-2);
  padding: 2px 8px;
  border-radius: var(--radius-rond);
  border: 1px solid var(--kleur-rand);
  letter-spacing: 0.04em;
}

.zoek-kaart-titel {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.zoek-kaart-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ruimte-xs);
  color: var(--kleur-tekst);
  text-decoration: none;
  transition: color var(--duur-micro) var(--ease-uit);
}

.zoek-kaart-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}

.zoek-kaart-link:hover {
  color: var(--accent);
}

.zoek-pijl-icoon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
  transform: translateX(0);
  transition: transform var(--duur-micro) var(--ease-uit),
              opacity var(--duur-micro) var(--ease-uit),
              color var(--duur-micro) var(--ease-uit);
}

.zoek-kaart:hover .zoek-pijl-icoon {
  opacity: 1;
  color: var(--accent);
  transform: translateX(4px);
}

.zoek-kaart-beschrijving {
  font-size: var(--tekst-m);
  line-height: 1.55;
  color: var(--kleur-tekst-zacht);
  margin: 0 0 var(--ruimte-m) 0;
}

/* Kopjes lijst per kaart */
.zoek-kopjes-groep {
  display: flex;
  flex-direction: column;
  gap: var(--ruimte-xs);
  padding-top: var(--ruimte-s);
  border-top: 1px solid var(--kleur-rand);
}

.zoek-kopjes-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--kleur-tekst-zacht);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.zoek-kopjes-lijst {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zoek-kopje-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--kleur-tekst-zacht);
  background: var(--kleur-vlak-2);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-xs);
  transition: all var(--duur-micro) var(--ease-uit);
}

/* Geaccentueerde match op een specifiek kopje */
.zoek-kopje-tag.is-match {
  color: var(--kleur-tekst);
  background: color-mix(in srgb, var(--accent) 22%, var(--kleur-vlak-2));
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ---------- 4. Lege toestand (Zero Results) ---------- */
.zoek-leeg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--ruimte-l) var(--ruimte-m);
  background: var(--kleur-vlak);
  border: 1px dashed var(--kleur-rand);
  border-radius: var(--radius-m);
  margin-top: var(--ruimte-m);
}

.zoek-leeg[hidden] {
  display: none !important;
}

.zoek-leeg-icoon {
  width: 44px;
  height: 44px;
  color: var(--kleur-tekst-zacht);
  margin-bottom: var(--ruimte-s);
}

.zoek-leeg-titel {
  margin: 0 0 var(--ruimte-xs) 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--kleur-tekst);
}

.zoek-leeg-tekst {
  margin: 0 0 var(--ruimte-m) 0;
  color: var(--kleur-tekst-zacht);
  font-size: var(--tekst-m);
  max-width: 44ch;
}

/* ---------- 5. Responsiviteit & Mobile Fold ---------- */
@media (max-width: 640px) {
  .zoek-invoer {
    height: 50px;
    padding: 0 78px 0 44px;
    font-size: 0.95rem;
  }

  .zoek-icoon {
    left: 12px;
    width: 18px;
    height: 18px;
  }

  .zoek-wissen {
    right: 42px;
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .zoek-sneltoets {
    right: 12px;
  }

  .zoek-sneltoets kbd {
    padding: 2px 5px;
    font-size: 10px;
  }

  .zoek-status-balk {
    flex-direction: column;
    align-items: flex-start;
  }

  .zoek-kaart {
    padding: var(--ruimte-s);
  }

  .zoek-kaart-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ---------- 6. Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .zoek-veld-omhulsel,
  .zoek-kaart,
  .zoek-pijl-icoon,
  .zoek-chip,
  .zoek-kopje-tag,
  .zoek-wissen {
    transition: none !important;
    transform: none !important;
  }
}

[data-beweging="uit"] .zoek-veld-omhulsel,
[data-beweging="uit"] .zoek-kaart,
[data-beweging="uit"] .zoek-pijl-icoon,
[data-beweging="uit"] .zoek-chip,
[data-beweging="uit"] .zoek-kopje-tag,
[data-beweging="uit"] .zoek-wissen {
  transition: none !important;
  transform: none !important;
}

/* ==========================================================================
   Component Integratie (css/componenten.css -> zoeken.css)
   Harmoniseert de gedeelde kerncomponenten (.sectie-kop, .kaart, .label, .grid, .knop)
   met het zoeksysteem.
   ========================================================================== */
.zoek-kaart.kaart {
  min-height: auto;
}

.zoek-snelle-termen.knoppen {
  display: inline-flex;
}

