/* ==========================================================================
   Componenten: knoppen, chips, schakelaars, poule-labels, tabellen, lichtkrant,
   scorebord, uitklappers, statusmeldingen
   ========================================================================== */

/* --- Knoppen: schuine achtergrond zoals sportgraphics, recht klikvlak ---- */

.btn {
  --btn-bg: var(--lime-400);
  --btn-fg: var(--night-900);
  --btn-border: transparent;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0.75em 1.6em;
  border: 0;
  background: none;
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-style: italic;
  font-weight: 800;
  font-stretch: 100%;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-bg);
  border: 2px solid var(--btn-border);
  border-radius: 4px;
  transform: skewX(var(--skew));
  transition: transform var(--dur-base) var(--ease-out-expo), background-color var(--dur-fast) linear;
}

.btn .icon {
  transition: transform var(--dur-base) var(--ease-out-expo);
}

.btn:hover::before {
  transform: skewX(var(--skew)) scale(1.045);
}

.btn:hover .icon--arrow {
  transform: translateX(0.25em);
}

.btn:active::before {
  transform: skewX(var(--skew)) scale(0.98);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-border: currentColor;
}

.btn--ghost:hover {
  --btn-bg: rgb(250 252 254 / 0.1);
}

.btn--dark {
  --btn-bg: var(--night-900);
  --btn-fg: var(--lime-400);
}

.btn--ink-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: currentColor;
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.5em 1.1em;
  font-size: var(--step--1);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  align-items: center;
}

/* Tekstlink met pijl */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.1em;
}

.link-arrow .icon {
  width: 1em;
  height: 1em;
  transition: transform var(--dur-base) var(--ease-out-expo);
}

.link-arrow:hover .icon {
  transform: translateX(0.2em);
}

/* --- Chips en schakelaars ---------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 2.75rem;
  padding: 0.45em 1em;
  border: 1.5px solid var(--chip-border, currentColor);
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 600;
  font-size: var(--step--1);
  white-space: nowrap;
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear, border-color var(--dur-fast) linear;
}

.chip[aria-pressed="true"],
.chip[aria-selected="true"],
.chip.is-active {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--night-900);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: var(--radius-pill);
  background: var(--segmented-bg, rgb(250 252 254 / 0.08));
  border: 1px solid var(--segmented-border, rgb(250 252 254 / 0.16));
}

.segmented button {
  min-height: 2.5rem;
  min-width: 4.5rem;
  padding: 0.35em 1.1em;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 95%;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear;
}

.segmented button[aria-selected="true"],
.segmented button[aria-pressed="true"] {
  background: var(--lime-400);
  color: var(--night-900);
}

.theme-light .segmented,
.theme-light-2 .segmented {
  --segmented-bg: var(--white);
  --segmented-border: var(--line);
}

/* --- Poule-label: kleur plus tekst ------------------------------------- */

.poule-tag {
  display: inline-grid;
  place-items: center;
  min-width: 2.4em;
  padding: 0.15em 0.55em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-stretch: 90%;
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--night-900);
  background: var(--tag-color, var(--lime-400));
  transform: skewX(var(--skew));
  border-radius: 2px;
}

.poule-tag[data-poule="D"] { --tag-color: var(--poule-d); }
.poule-tag[data-poule="HA"] { --tag-color: var(--poule-ha); }
.poule-tag[data-poule="HB"] { --tag-color: var(--poule-hb); }
.poule-tag[data-poule="H1"] { --tag-color: var(--poule-h1); }
.poule-tag[data-poule="H2"] { --tag-color: var(--poule-h2); }
.poule-tag[data-poule="free"] { --tag-color: var(--lime-400); }

/* --- Tabellen ---------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.table th {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 95%;
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-2);
  padding: 0.6em 0.75em;
  border-bottom: 2px solid var(--ink);
}

.table td {
  padding: 0.8em 0.75em;
  border-bottom: 1px solid var(--line);
}

.table .num {
  text-align: right;
}

/* --- Lichtkrant -------------------------------------------------------- */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

.marquee__track {
  display: inline-flex;
  width: max-content;
  animation: marquee var(--marquee-duration, 48s) linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  padding-inline: 0.9em;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) .marquee__track {
    animation: none;
  }
}

/* --- Uitklappers (FAQ, routes) ----------------------------------------- */

.disclosure {
  border-bottom: 1px solid var(--line);
}

.disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: 3.5rem;
  padding: var(--space-s) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: var(--step-1);
  line-height: 1.2;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure__icon {
  position: relative;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--paper-2);
  transition: background-color var(--dur-fast) linear, transform var(--dur-base) var(--ease-out-expo);
}

.disclosure__icon::before,
.disclosure__icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.8rem;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.disclosure__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform var(--dur-base) var(--ease-out-expo);
}

.disclosure[open] .disclosure__icon {
  background: var(--lime-400);
}

.disclosure[open] .disclosure__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.disclosure__body {
  padding: 0 0 var(--space-m);
  max-width: var(--measure);
  color: var(--ink-2);
}

/* --- Status: laden en fouten ------------------------------------------- */

.state {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-m);
  border-radius: var(--radius-m);
  border: 1.5px dashed currentColor;
  opacity: 0.85;
  font-weight: 500;
}

.state--error {
  border-style: solid;
  border-color: var(--floor-red);
}

.skeleton {
  border-radius: var(--radius-s);
  background: linear-gradient(90deg, rgb(127 127 127 / 0.12), rgb(127 127 127 / 0.22), rgb(127 127 127 / 0.12));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* --- Onthulling bij scrollen ------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity var(--dur-slow) var(--ease-out-expo), transform var(--dur-slow) var(--ease-out-expo);
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion).js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- Responsief -------------------------------------------------------- */

@media (max-width: 980px) {
  .btn {
    padding: 0.7em 1.35em;
  }
}

@media (max-width: 640px) {
  .btn-row--stack {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row--stack .btn {
    width: 100%;
  }

  .table th,
  .table td {
    padding-inline: 0.5em;
  }
}

@media (max-width: 420px) {
  .btn {
    font-size: var(--step--1);
    padding-inline: 1.1em;
  }

  .segmented button {
    min-width: 3.75rem;
    padding-inline: 0.8em;
  }
}
