/* ──────────────────────────────────────────────────────────────
   TJIDDE Supportvoordeur — [tjidde_helpdesk]
   Gebruikt uitsluitend bestaande :root-tokens uit main.css.
   ────────────────────────────────────────────────────────────── */

.tjidde-helpdesk {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--wit);
  border: 1px solid var(--licht);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ── Zoekblok ─────────────────────────────────────────────── */

.thd-zoekform { margin: 0; }

.thd-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--donker);
  line-height: 1.2;
  margin: 0 0 .4rem;
}

.thd-uitleg {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

.thd-zoekrij {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
}

.thd-input {
  flex: 1 1 18rem;
  min-width: 0;
  padding: .8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--donker);
  background: var(--bg);
  border: 1px solid var(--licht);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.thd-input::placeholder { color: var(--subtiel); }

.thd-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 48, 88, .16);
}

.thd-knop {
  flex: 0 0 auto;
  display: inline-block;
  padding: .8rem 1.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--wit);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.thd-knop:hover,
.thd-knop:focus-visible { background: var(--hover); border-color: var(--hover); color: var(--wit); }

.thd-knop--stil {
  color: var(--accent);
  background: transparent;
  border-color: var(--licht);
}

.thd-knop--stil:hover,
.thd-knop--stil:focus-visible {
  background: var(--card-bg);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Snelkeuze ────────────────────────────────────────────── */

.thd-snelkeuze { margin-top: 1.5rem; }

.thd-snelkeuze__kop {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 .625rem;
}

.thd-snelkeuze__lijst {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
}

.thd-snelkeuze__lijst li { margin: 0; }

.thd-chip {
  display: inline-block;
  padding: .45rem .85rem;
  font-size: .9rem;
  line-height: 1.35;
  color: var(--subtitel);
  background: var(--bg);
  border: 1px solid var(--licht);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.thd-chip:hover,
.thd-chip:focus-visible {
  background: var(--card-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.thd-chip.is-actief {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--wit);
}

/* De route-chip (afspraak) is een andere handeling dan zoeken — subtiel onderscheiden. */
.thd-chip--route {
  font-weight: 600;
  color: var(--accent);
  border-color: var(--accent);
  background: var(--wit);
}

.thd-chip--route::after {
  content: " \2192";
  font-weight: 400;
}

/* ── Resultaten ───────────────────────────────────────────── */

.thd-resultaten:empty { display: none; }

.thd-resultaten {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--licht);
}

.thd-aantal,
.thd-geen {
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 .875rem;
}

.thd-geen strong { color: var(--subtitel); }

.thd-lijst {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}

.thd-item { margin: 0; }

.thd-item details {
  background: var(--bg);
  border: 1px solid var(--licht);
  border-radius: var(--radius);
  overflow: hidden;
}

.thd-item details[open] { background: var(--card-bg); border-color: var(--subtiel); }

.thd-item__vraag {
  display: block;
  padding: .8rem 2.25rem .8rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.015em;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--donker);
  cursor: pointer;
  position: relative;
  list-style: none;
}

.thd-item__vraag::-webkit-details-marker { display: none; }

/* Chevron, met CSS getekend — geen icoonfont of emoji. */
.thd-item__vraag::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 1.15rem;
  width: .5rem;
  height: .5rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.thd-item details[open] .thd-item__vraag::after {
  transform: rotate(-135deg);
  top: 1.35rem;
}

.thd-item__vraag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.thd-item__antwoord {
  padding: 0 1rem 1rem;
  color: var(--subtitel);
  font-size: .95rem;
  line-height: 1.65;
}

/* Antwoorden komen als platte tekst binnen (nooit HTML) — regelafbrekingen via CSS. */
.thd-item__antwoord p { margin: 0 0 .75rem; white-space: pre-line; }

.thd-item__link {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thd-item__link:hover { color: var(--hover); }

/* ── Vervolgstap ──────────────────────────────────────────── */

.thd-vervolg {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--licht);
}

.thd-vervolg__vraag {
  font-size: .95rem;
  color: var(--subtitel);
  margin: 0 0 .875rem;
}

.thd-vervolg__knoppen {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.thd-vervolg__dank {
  font-size: .95rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

/* ── De drie uitwegen (sessie 45) ──────────────────────────────
 * Vervangt de enkele knop "naar het supportformulier". De bezoeker kiest zelf waar hij
 * heen gaat; de best passende keuze staat vooraan en heeft de nadruk. Kaarten en geen
 * knoppenrij, want elke uitweg heeft een regel uitleg nodig om te kunnen kiezen. */

.thd-routes {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: .625rem;
}

.thd-route__link {
  display: block;
  padding: .875rem 1.125rem;
  background: var(--wit);
  border: 1px solid var(--licht);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}

.thd-route__link:hover,
.thd-route__link:focus-visible {
  border-color: var(--accent);
  background: var(--card-bg);
}

.thd-route__label {
  display: block;
  color: var(--donker);
  font-weight: 600;
  margin-bottom: .15rem;
}

.thd-route__uitleg {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}

/* De uitweg die bij de gekozen categorie hoort. Eén accentlijn is genoeg — een
 * volvlak-knop zou de andere twee wegdrukken terwijl ze even geldig zijn. */
.thd-route--primair .thd-route__link {
  border-color: var(--accent);
  border-left-width: 4px;
}

.thd-route--primair .thd-route__label { color: var(--accent); }

/* ── Bezig-melding tijdens live zoeken ────────────────────── */

.thd-bezig {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 480px) {
  .thd-zoekrij { flex-direction: column; }
  /* `flex: 1 1 18rem` slaat in een kolom op de hóógte, niet op de breedte — het zoekveld
   * werd daardoor 288px hoog. In deze richting hoort alleen de breedte vol te lopen. */
  .thd-input { flex: 0 0 auto; width: 100%; }
  .thd-knop { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .thd-route__link { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .thd-input,
  .thd-knop,
  .thd-chip,
  .thd-item__vraag::after { transition: none; }
}
