/* Schlägerfinder (inc/finder.php, assets/js/finder.js).
   Kennung fi-. Farben aus optik-bunt.css (--op-*), mit Rückfall, weil diese
   Datei vor ihr lädt. Die Bühne ist Navy wie der Kategoriekopf, Auswahl und
   Fortschritt tragen Ballgrün. */

.fi-seite { padding-bottom: var(--sh-takt); }
.fi-kopf, .fi-ergebnis-kopf { padding: 16px 0 24px; }
.fi-kopf .sh-h1, .fi-ergebnis-kopf .sh-h1 { margin-top: 10px; }
.fi-kopf .sh-text, .fi-ergebnis-kopf .sh-text { margin-top: 12px; }

/* ── Bühne mit den Fragen ─────────────────────────────────────────── */
.fi-buehne {
  --fi-navy: var(--op-navy, #07295d);
  --fi-ball: var(--op-ball, #d6f03c);
  position: relative;
  padding: clamp(20px, 4vw, 44px);
  border-radius: 22px;
  background: var(--fi-navy);
  color: #ffffff;
  overflow: hidden;
  scroll-margin-top: 150px;   /* unter dem mitlaufenden Kopf */
}
/* Court-Linien, sehr leise, wie im Kategoriekopf. */
.fi-buehne::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 100% 120px,
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 120px 100%;
}
.fi-buehne > * { position: relative; }

.fi-frage { min-width: 0; margin: 0; padding: 0; border: 0; }
.fi-frage + .fi-frage { margin-top: 44px; }
.fi-schritte .fi-frage + .fi-frage { margin-top: 0; }
.fi-frage[hidden] { display: none; }
.fi-frage-kopf { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 0; color: #ffffff; outline: none; }
.fi-nummer {
  flex: none;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1;
  font-weight: var(--pc-gewicht-sport); font-stretch: var(--pc-breite-sport);
  color: var(--fi-ball); font-variant-numeric: tabular-nums;
}
.fi-titel {
  font-size: clamp(1.625rem, 3.4vw, 2.75rem); line-height: 1;
  font-weight: var(--pc-gewicht-sport); font-stretch: var(--pc-breite-sport);
  text-transform: uppercase; text-wrap: balance;
}
.fi-hinweis { margin: 12px 0 0; max-width: 60ch; font-size: 1rem; line-height: 1.5; color: rgba(255,255,255,.78); }

.fi-antworten { display: grid; gap: 12px; margin-top: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .fi-antworten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .fi-antworten-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fi-antworten-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fi-antworten-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.fi-antwort {
  position: relative;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  min-height: 76px; padding: 16px 44px 16px 18px;
  border: 1px solid rgba(255,255,255,.32); border-radius: 16px;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
@media (hover: hover) { .fi-antwort:hover { border-color: #ffffff; background: rgba(255,255,255,.12); } }
.fi-antwort-name {
  font-size: 1.0625rem; line-height: 1.15;
  font-weight: var(--pc-gewicht-sport-titel, 700); font-stretch: var(--pc-breite-sport-sub);
  text-transform: uppercase; letter-spacing: .01em;
}
.fi-antwort-text { font-size: .875rem; line-height: 1.4; color: rgba(255,255,255,.78); }
/* Der Kreis rechts zeigt die Wahl auch ohne Farbe. */
.fi-antwort::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border: 2px solid rgba(255,255,255,.6); border-radius: 50%;
}
.fi-antwort:has(input:checked) { border-color: var(--fi-ball); background: var(--fi-ball); color: var(--fi-navy); }
.fi-antwort:has(input:checked) .fi-antwort-text { color: var(--fi-navy); }
.fi-antwort:has(input:checked)::after { border-color: var(--fi-navy); background: radial-gradient(circle, var(--fi-navy) 0 42%, transparent 46%); }
.fi-antwort:has(input:focus-visible) { outline: 3px solid #ffffff; outline-offset: 3px; }

/* Fortschritt (nur mit Skript sichtbar). */
.fi-fortschritt { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.fi-fortschritt[hidden] { display: none; }
.fi-zurueck {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255,255,255,.42); border-radius: 50%;
  background: transparent; color: #ffffff; cursor: pointer;
}
@media (hover: hover) { .fi-zurueck:not([disabled]):hover { border-color: #ffffff; background: rgba(255,255,255,.12); } }
.fi-zurueck:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }
.fi-zurueck[disabled] { opacity: .35; cursor: default; }
.fi-balken { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.fi-balken span { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--fi-ball); transition: width .25s ease; }
.fi-stand { flex: none; margin: 0; font-size: .875rem; font-weight: 600; color: var(--fi-ball); font-variant-numeric: tabular-nums; }

.fi-meldung { margin: 18px 0 0; font-size: .9375rem; color: #ffffff; font-weight: 600; }
.fi-meldung[hidden] { display: none; }
.fi-fuss { margin-top: 28px; }
.fi-buehne .fi-weiter { background: var(--fi-ball); color: var(--fi-navy); }
.fi-buehne .fi-weiter:hover { background: var(--fi-ball); }
@media (hover: hover) { .fi-buehne .fi-weiter:hover { background: #ffffff; } }
.fi-buehne .fi-weiter:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }

@media (max-width: 639px) {
  .fi-buehne { margin-left: -4px; margin-right: -4px; border-radius: 18px; }
  .fi-frage-kopf { gap: 10px; }
  .fi-antwort { min-height: 64px; padding-top: 12px; padding-bottom: 12px; }
  .fi-fuss .fi-weiter { width: 100%; }
}

/* ── Ergebnis ─────────────────────────────────────────────────────── */
.fi-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.fi-wahl li {
  padding: 7px 12px; border-radius: 999px;
  background: var(--op-himmel, #e3eefc); color: var(--op-navy, #07295d);
  font-size: .8125rem; line-height: 1.3; font-weight: 600;
}
.fi-wahl-frage { font-weight: 400; opacity: .8; }
.fi-wahl li.fi-wahl-aendern { padding: 0 4px; background: none; }
.fi-wahl-aendern a { display: inline-flex; align-items: center; min-height: 44px; }

.fi-karten { display: grid; gap: 20px; margin: 8px 0 0; padding: 0; list-style: none; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) {
  .fi-karten-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
  .fi-karten-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fi-karten-1 { max-width: 420px; }
}
.fi-karte {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--pc-line, #e3e6e9); border-radius: 22px;
  background: #ffffff; box-shadow: var(--op-schatten, 0 6px 18px rgba(7,41,93,.08));
  overflow: hidden;
}
.fi-karte-erste { border: 2px solid var(--op-navy, #07295d); }
.fi-karte-band {
  margin: 0; padding: 10px 16px;
  background: var(--op-navy, #07295d); color: var(--op-ball, #d6f03c);
  font-size: .8125rem; line-height: 1.2; text-align: center;
  font-weight: var(--pc-gewicht-sport-titel, 700); font-stretch: var(--pc-breite-sport-sub);
  text-transform: uppercase; letter-spacing: .04em;
}
.fi-karte-kopf { position: relative; }
.fi-karte-bild { display: flex; align-items: center; justify-content: center; height: clamp(230px, 24vw, 310px); background: var(--op-feld, #f3f6fb); }
.fi-karte-bild img { display: block; width: auto; height: 94%; max-width: 92%; object-fit: contain; mix-blend-mode: multiply; }
.fi-karte-bild img.op-frei { mix-blend-mode: normal; filter: drop-shadow(0 10px 14px rgba(7,41,93,.18)); }
.fi-passung {
  position: absolute; top: 12px; right: 12px; margin: 0; padding: 6px 12px;
  border-radius: 999px; background: var(--op-navy, #07295d); color: var(--op-ball, #d6f03c);
  font-size: .875rem; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fi-karte-text { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 18px 18px 20px; }
.fi-karte-name { margin: 0; font-size: 1.125rem; line-height: 1.25; font-weight: 700; }
.fi-karte-name a { color: var(--sh-text); text-decoration: none; }
.fi-karte-name a:hover { text-decoration: underline; text-underline-offset: .15em; }
.fi-gruende { margin: 4px 0 0; padding: 0; list-style: none; }
.fi-gruende li { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: .9375rem; line-height: 1.4; color: var(--sh-text); }
.fi-gruende .sh-symbol { margin-top: 2px; color: var(--op-court, #1d5aa0); stroke-width: 2.5; }
.fi-karte-tat { margin-top: auto; }
.fi-gruende + .fi-karte-tat { margin-top: 12px; }
@media (min-width: 900px) { .fi-gruende + .fi-karte-tat { margin-top: auto; } .fi-karte-tat { margin-bottom: 0; } }

/* „Passt auch“: Kacheln des Themes in einer Bahn zum Rollen, die Passung
   als erste Flagge. Die Bahn rastet per scroll-snap; Pfeile bringt finder.js. */
.fi-auch { margin-top: 44px; }
.fi-auch-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.fi-auch .sh-h2 { margin: 0; }
.fi-auch-pfeile { display: flex; gap: 8px; }
.fi-auch-pfeile[hidden] { display: none; }
.fi-pfeil {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--sh-rand, #868c93); border-radius: 50%;
  background: #ffffff; color: var(--op-navy, #07295d); cursor: pointer;
}
.fi-pfeil:focus-visible { outline: 3px solid var(--op-court, #1d5aa0); outline-offset: 2px; }
.fi-pfeil[disabled] { opacity: .35; cursor: default; }
@media (hover: hover) { .fi-pfeil:not([disabled]):hover { border-color: var(--op-navy, #07295d); background: var(--op-himmel, #e3eefc); } }
.fi-auch ul.products {
  display: grid; grid-auto-flow: column; grid-template-columns: none;
  grid-auto-columns: calc((100% - 3 * var(--sh-luecke, 16px)) / 4);
  gap: var(--sh-luecke, 16px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  /* Luft für Schatten und Fokusrahmen der Kacheln, sonst schneidet die Bahn sie ab. */
  margin: 0 -6px; padding: 6px 6px 16px; scroll-padding-left: 6px;
  scrollbar-width: thin;
}
.fi-auch ul.products > li { scroll-snap-align: start; min-width: 0; }
.fi-reihe-aktiv ul.products { scrollbar-width: none; }
.fi-reihe-aktiv ul.products::-webkit-scrollbar { display: none; }
@media (max-width: 1099px) { .fi-auch ul.products { grid-auto-columns: calc((100% - 2 * var(--sh-luecke, 16px)) / 3); } }
@media (max-width: 759px) {
  /* Am Telefon bis an den Rand, die dritte Kachel angeschnitten. */
  .fi-auch ul.products {
    grid-auto-columns: 46%;
    margin: 0 calc(-1 * var(--sh-rand-seite, 16px)); padding: 6px var(--sh-rand-seite, 16px) 16px;
    scroll-padding-left: var(--sh-rand-seite, 16px);
  }
}

/* Ansicht „Alle passenden Schläger“ */
.fi-liste-zurueck { margin: 0 0 20px; }
.fi-liste-zurueck .sh-verweis { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.sh-flagge.fi-flagge { background: var(--op-navy, #07295d); color: var(--op-ball, #d6f03c); border-color: transparent; }
.sh-flagge.fi-flagge::after { display: none; }

.fi-ergebnis-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.fi-ergebnis-fuss .sh-verweis { display: inline-flex; align-items: center; min-height: 44px; }
.fi-ergebnis-fuss .sh-tat-neben { display: inline-flex; align-items: center; gap: 8px; }

/* ── Einstiege ────────────────────────────────────────────────────── */

/* 1. Fünfte Karte in „Welches Niveau spielst du?“ */
@media (min-width: 900px) {
  .sh-niveau-raster:has(.fi-einstieg) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.op-bunt .sh-niveau-kachel.fi-einstieg { --op-n: var(--op-navy, #07295d); color: #ffffff; }
.op-bunt .sh-niveau-kachel.fi-einstieg .sh-niveau-name { color: #ffffff; }
.op-bunt .sh-niveau-kachel.fi-einstieg .sh-niveau-text { color: rgba(255,255,255,.82); }
.op-bunt .sh-niveau-kachel.fi-einstieg .sh-niveau-zahl { display: inline-flex; align-items: center; gap: 6px; color: var(--op-ball, #d6f03c); }
.sh-niveau-kachel .fi-einstieg-platte {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: transparent; color: var(--op-ball, #d6f03c);
}
.fi-einstieg-zahl {
  font-size: clamp(5rem, 9vw, 7.5rem); line-height: .8;
  font-weight: var(--pc-gewicht-sport); font-stretch: var(--pc-breite-sport);
}
.fi-einstieg-wort {
  font-size: 1rem; line-height: 1;
  font-weight: var(--pc-gewicht-sport-titel, 700); font-stretch: var(--pc-breite-sport-sub);
  text-transform: uppercase; letter-spacing: .12em; color: #ffffff;
}

/* 2. Band über der Schlägerliste */
.fi-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin: 8px 0 20px; padding: 14px 18px 14px 22px;
  border-radius: 16px; background: var(--op-limezart, #f1f9cf); color: var(--op-navy, #07295d);
}
.fi-band-text { margin: 0; font-size: 1rem; line-height: 1.4; }
.fi-band-text strong {
  margin-right: 6px;
  font-weight: var(--pc-gewicht-sport-titel, 700); font-stretch: var(--pc-breite-sport-sub);
  text-transform: uppercase; letter-spacing: .01em;
}
.fi-band .sh-tat { background: var(--op-navy, #07295d); color: #ffffff; }
.fi-band .sh-tat:hover { background: var(--op-court, #1d5aa0); }
@media (max-width: 639px) {
  .fi-band { padding: 14px 16px; }
  .fi-band .sh-tat { width: 100%; justify-content: center; }
}

/* 3. Menü unter Schläger */
.sh-menue-ganz + .fi-menue { margin-top: 10px; }
.sh-menue-tafel a.fi-menue { margin-left: 28px; }
.sh-menue-klappe a.fi-menue { margin: 0 0 20px; }

@media (prefers-reduced-motion: reduce) {
  .fi-antwort, .fi-balken span { transition: none; }
}
