/* Trainingsplan zum Abhaken (admin-fit, admin-fit-plan). Baut auf style.css auf (er-*, tr-*,
   btn), hier steht nur, was es nur hier gibt. Eigene Datei, damit style.css der anderen
   Bereiche unberührt bleibt. */

/* ---------- Spielerkarte: Level, Punkte, Serie ----------
   Für Daves Bruder (11): Abhaken soll sich lohnen. Punkte gibt es nur fürs Abhaken, nie für
   mehr Wiederholungen (fit_belohnung in fit-model.php). */
.fit-spieler { display: grid; gap: 14px; }
.fit-level { display: flex; align-items: center; gap: 14px; }
.fit-level-nr {
  flex: none; width: 62px; height: 62px; border-radius: 16px; display: grid; place-content: center; text-align: center;
  background: linear-gradient(145deg, var(--yellow), #ffb84d); color: #08080d; box-shadow: 0 0 18px rgba(245,224,0,0.35);
}
.fit-level-nr small { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1; }
.fit-level-nr b { font-family: var(--font-head); font-size: 1.7rem; line-height: 1; }
.fit-level-text { flex: 1; min-width: 0; display: grid; gap: 6px; }
.fit-level-text strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--paper); line-height: 1.1; }
.fit-level-text small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.fit-level-text small b { color: var(--yellow); }
.fit-xp { height: 10px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.fit-xp span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--yellow)); transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }

.fit-serie { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.fit-serie-zahl { font-family: var(--font-head); font-size: 0.95rem; color: var(--paper); }
.fit-serie-zahl b { color: var(--yellow); font-size: 1.2rem; }
.fit-woche { display: flex; gap: 5px; }
.fit-woche span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); border: 1px solid transparent;
}
.fit-woche .ist-geplant { border-color: var(--line); color: var(--paper); }
.fit-woche .ist-geschafft { background: var(--yellow); border-color: var(--yellow); color: #08080d; font-weight: 700; font-size: 0.85rem; }
.fit-woche .ist-heute { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Einheit des Tages ---------- */
.fit-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 18px 0 8px; }
.fit-kopf h2 { margin: 0; font-size: 1.35rem; }
.fit-fortschritt { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--cyan); white-space: nowrap; }
/* Am Ende des Balkens wartet der Bonus, daneben statt darin: so bleibt er lesbar, egal wie voll. */
.fit-balken-zeile { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fit-balken { flex: 1; height: 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.fit-balken span { display: block; height: 100%; background: var(--cyan); border-radius: inherit; transition: width 0.45s cubic-bezier(0.2, 0.7, 0.3, 1); }
.ist-voll .fit-balken span { background: var(--yellow); }
.fit-balken-zeile em { flex: none; font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.fit-balken-zeile.ist-voll em { color: var(--yellow); }
.fit-notiz { margin: -4px 0 12px; }
.fit-tipp {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(51,230,224,0.5);
  background: rgba(51,230,224,0.07); color: var(--paper); font-size: 0.88rem; line-height: 1.45;
}
.fit-tipp b { color: var(--cyan); }
.fit-pause p { margin: 0 0 12px; color: var(--muted); }
.fit-pause strong { display: block; color: var(--paper); font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 4px; }
.fit-wahl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fit-wahl-titel { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); flex-basis: 100%; }
.fit-link {
  background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; font-size: 0.85rem; cursor: pointer; text-decoration: underline;
  min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px;
}
.fit-andere { margin: 8px 0 0; }

/* ---------- Übung: die ganze obere Zeile ist der Haken-Knopf ---------- */
.fit-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fit-uebung { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px; transition: border-color 0.2s, background 0.2s; }
.fit-uebung.ist-erledigt { border-color: rgba(245,224,0,0.55); background: linear-gradient(0deg, rgba(245,224,0,0.06), rgba(245,224,0,0.06)), var(--panel); }
.fit-zeile {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; text-align: left;
  background: none; border: 0; border-radius: 10px; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fit-zeile:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.fit-zeile:disabled { cursor: not-allowed; }
.fit-haken {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); border: 2px dashed var(--cyan); color: var(--cyan);
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.fit-haken svg { width: 26px; height: 26px; }
.fit-zeile:active .fit-haken { transform: scale(0.9); }
@media (hover: hover) {
  .fit-zeile:hover:not(:disabled) .fit-haken { background: rgba(51,230,224,0.12); }
}
.fit-uebung.ist-erledigt .fit-haken { background: var(--yellow); border: 2px solid var(--yellow); color: #08080d; animation: fit-plopp 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.fit-zeile:disabled .fit-haken { opacity: 0.4; border-style: solid; border-color: var(--line); color: var(--muted); }
@keyframes fit-plopp { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
.fit-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fit-name { color: var(--paper); font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; }
.ist-erledigt .fit-name { color: var(--yellow); }
.fit-ziel { font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan); }
.fit-bereit { font-family: var(--font-mono); font-size: 0.72rem; color: var(--yellow); }
.fit-hinweis { margin: 0 8px 8px 72px; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.fit-geschafft { display: flex; align-items: center; gap: 8px; margin: 0 8px 8px 72px; flex-wrap: wrap; }
.fit-geschafft-titel { font-size: 0.75rem; color: var(--muted); flex-basis: 100%; }
.fit-geschafft .er-stepper-knopf { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 10px; }
.fit-geschafft-wert { min-width: 84px; text-align: center; font-family: var(--font-head); font-weight: 700; color: var(--paper); }
.fit-vorschlag {
  margin: 0 8px 8px 72px; padding: 10px 12px; border-radius: 10px; background: rgba(245,224,0,0.1); border: 1px solid rgba(245,224,0,0.35);
  font-size: 0.85rem; color: var(--paper); display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.fit-vorschlag span { flex-basis: 100%; }
.fit-vorschlag .btn { min-height: 44px; padding: 0 16px; }
.fit-fertig { margin-top: 14px; text-align: center; padding: 20px 16px; border-color: rgba(245,224,0,0.55); }
.fit-fertig strong { display: block; font-family: var(--font-head); font-size: 1.3rem; color: var(--yellow); margin-bottom: 4px; }
.fit-fertig p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Abzeichen ---------- */
.fit-abzeichen-bereich { margin-top: 26px; }
.fit-abschnitt { font-size: 1.1rem; margin: 0 0 10px; display: flex; align-items: baseline; justify-content: space-between; }
.fit-abschnitt small { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); font-weight: 400; }
.fit-abzeichen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fit-abzeichen li {
  position: relative; display: grid; gap: 2px; padding: 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
}
.fit-abzeichen .ist-da { border-color: rgba(245,224,0,0.55); }
.fit-abz-symbol { font-size: 1.7rem; line-height: 1; margin-bottom: 4px; }
.fit-abzeichen b { font-family: var(--font-head); font-size: 0.92rem; color: var(--paper); }
.fit-abzeichen small { font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.fit-abzeichen .ist-offen .fit-abz-symbol { filter: grayscale(1); opacity: 0.35; }
.fit-abzeichen .ist-offen b { color: var(--muted); }
.fit-abz-schloss { position: absolute; top: 10px; right: 10px; font-size: 0.8rem; opacity: 0.6; }

/* ---------- Feiern: Toast, "+10", Konfetti ---------- */
.fit-toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); z-index: 300;
  transform: translate(-50%, -140%); max-width: calc(100vw - 32px);
  width: max-content; padding: 12px 18px; border-radius: 18px; background: var(--paper); color: #08080d; text-align: center;
  font-size: 0.95rem; line-height: 1.35; box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); pointer-events: none;
}
.fit-toast.ist-sichtbar { transform: translate(-50%, 0); }
.fit-plus {
  position: fixed; z-index: 300; pointer-events: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--yellow);
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.fit-konfetti { position: fixed; z-index: 299; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; }

/* ---------- Plan bearbeiten ---------- */
.fit-plan-tag { margin-bottom: 12px; }
.fit-plan-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fit-plan-kopf h2 { margin: 0; font-size: 1.1rem; flex: 1; min-width: 0; }
.fit-plan-kopf small { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.fit-pause-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 12px; color: var(--muted); }
.fit-pause-zeile b { color: var(--paper); font-weight: 600; }
.fit-plan-liste { list-style: none; margin: 0 0 10px; padding: 0; }
.fit-plan-liste li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fit-plan-liste li:last-child { border-bottom: 0; }
.fit-plan-liste .fit-text small { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.fit-mini { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--ink); border: 1px solid var(--line); color: var(--paper); cursor: pointer; font-size: 0.95rem; }
.fit-mini:disabled { opacity: 0.3; cursor: default; }
.fit-formular { display: grid; gap: 10px; padding: 12px; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.fit-formular .fit-zwei { display: grid; grid-template-columns: 0.8fr 0.9fr 1.6fr; gap: 8px; }
/* Sehr schmale Handys: Einheit in eine eigene Zeile, sonst wird "Sekunden" abgeschnitten. */
@media (max-width: 360px) {
  .fit-formular .fit-zwei { grid-template-columns: 1fr 1fr; }
  .fit-formular .fit-zwei > :nth-child(3) { grid-column: 1 / -1; }
}
.fit-formular .fit-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.fit-tag-werkzeuge { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.fit-tag-werkzeuge select { background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: inherit; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  .fit-haken, .fit-xp span, .fit-balken span, .fit-toast { transition: none; }
  .fit-uebung.ist-erledigt .fit-haken { animation: none; }
}

/* Uhrzeit-Feld: das eingebaute Uhr-Symbol sonst schwarz auf dunklem Grund. */
.er-seite input[type="time"] { color-scheme: dark; }
