/* ===== components.css – Buttons, Antworten, Listen, Karten, Tabellen ===== */

/* --- Buttons --- */
.btn {
  display: block; width: 100%; margin: 12px 0; padding: 16px 18px; border: 0; border-radius: var(--r);
  font-size: 1.05rem; font-weight: 600; color: #fff; cursor: pointer; background: var(--brand);
  box-shadow: 0 10px 20px -12px rgba(5, 136, 67, .9); transition: transform .12s, opacity .12s, background .12s;
}
.btn:active { transform: scale(.98); background: var(--brand-press); }
.btn.sec { background: var(--fill); color: var(--brand); box-shadow: none; }
.btn.sec:active { background: var(--line); }
.btn.gold { background: var(--btn-dark-bg); color: var(--btn-dark-fg); box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .5); }   /* "besondere Aktion": schwarz */
.btn[disabled] { background: var(--fill); color: var(--muted); box-shadow: none; transform: none; cursor: default; }
.btns { display: flex; gap: 12px; } .btns .btn { flex: 1; }

/* --- Fortschritt (dünne Linie) --- */
.progress { display: flex; justify-content: space-between; margin: 0 2px 8px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.bar { height: 4px; border-radius: 4px; overflow: hidden; background: var(--fill); }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .3s; }

/* --- Antwort-Felder (Fragen, Fische, Rutenbau) --- */
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; margin: 10px 0; padding: 12px 16px;
  text-align: left; font-size: 1.02rem; line-height: 1.3; color: var(--ink); cursor: pointer;
  background: var(--card); border: 1.5px solid transparent; border-radius: var(--r); box-shadow: var(--shadow-1);
  transition: transform .1s, border-color .15s, background .15s;
}
.opt:active:not([disabled]) { transform: scale(.985); }
.opt .l { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--fill); }
.opt > span:only-child { width: 100%; text-align: center; font-weight: 600; }
.opt.sel { border-color: var(--brand); background: var(--brand-tint); }
.opt.sel::after { content: "●"; flex: none; color: var(--brand); font-size: .75rem; }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); }
.opt.ok .l { background: var(--ok); color: #fff; } .opt.bad .l { background: var(--bad); color: #fff; }
.opt.ok::after, .opt.bad::after { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .8rem; font-weight: 700; }
.opt.ok::after { content: "✓"; background: var(--ok); } .opt.bad::after { content: "✕"; background: var(--bad); }
.opt[disabled] { cursor: default; opacity: 1; }
.opt[disabled]:not(.ok):not(.bad) { opacity: .45; box-shadow: none; }

/* Rückmeldung unter den Antworten */
.opt ~ p.good, .opt ~ p.wrong { padding: 12px 16px; border-radius: var(--r-sm); font-size: .96rem; }
.opt ~ p.good { background: var(--ok-bg); } .opt ~ p.wrong { background: var(--bad-bg); }

/* Erklärung nach der Antwort (Fragen üben): Ergebnis + kurzes „Warum?“ */
.erkl { margin: 12px 0; padding: 14px 16px; border-radius: var(--r-sm); background: var(--ok-bg); }
.erkl.falsch { background: var(--bad-bg); }
.erkl b { display: block; font-weight: 650; }
.erkl.richtig b { color: var(--ok); } .erkl.falsch b { color: var(--bad); }
.erkl p { margin: 6px 0 0; font-size: .93rem; line-height: 1.4; color: var(--ink); }

/* --- Anmeldung --- */
#login label { display: block; margin: 0 0 14px; font-size: .85rem; font-weight: 500; color: var(--muted); }
#login input { display: block; width: 100%; margin-top: 6px; padding: 14px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--fill); border: 1.5px solid transparent; border-radius: var(--r-sm); }
#login input:focus { outline: 0; border-color: var(--brand); background: var(--card); }
.link { padding: 6px; font: inherit; font-size: .85rem; color: var(--brand); background: none; border: 0; cursor: pointer; }

/* --- Lernmaterial & Verein --- */
a.btn { text-align: center; text-decoration: none; }
.row[hidden] { display: none; }
.suche { display: block; width: 100%; margin: 12px 0; padding: 14px 16px; font: inherit; color: var(--ink); background: var(--card); border: 0; border-radius: var(--r); box-shadow: var(--shadow-1); }
.steckbrief { display: block; } .steckbrief img { display: block; width: 100%; height: auto; border-radius: var(--r); box-shadow: var(--shadow-1); }
.wissen h4 { margin: 0 0 8px; font-size: 1.1rem; }
.wissen img { display: block; width: 100%; height: auto; margin: 10px 0; border-radius: var(--r-sm); background: #fff; }
.wissen p { line-height: 1.5; } .wissen ul, .card > ul { margin: 8px 0; padding-left: 20px; line-height: 1.45; }

/* --- Hinweise --- */
.note { position: relative; margin: 14px 0; padding: 12px 14px 12px 42px; border-radius: var(--r-sm); font-size: .88rem; background: var(--tint-3); }
.note::before { content: "ℹ️"; position: absolute; left: 14px; top: 11px; }

/* --- Listen-Zeilen (Gebiete, Aufgaben) --- */
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0; padding: 14px 16px; text-align: left; cursor: pointer;
  color: inherit; background: var(--card); border: 0; border-radius: var(--r); box-shadow: var(--shadow-1); transition: transform .1s;
}
.row:active { transform: scale(.985); }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 600; }
.row .badge { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--fill); white-space: nowrap; }
.row::after { content: "›"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--muted); opacity: .6; }
.row .bar { margin-top: 9px; }

/* --- Karten & Tabellen --- */
.card { margin: 14px 0; padding: 16px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card ol { margin: 8px 0 0; padding-left: 20px; } .card li { margin: 8px 0; }
table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow-1); font-size: .95rem; }
td, th { padding: 13px 16px; text-align: left; vertical-align: middle; border-bottom: .5px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.r { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
