/* Freigabe-Protokoll und "Okay von oben" (2026-11-26), zu freigabe-protokoll.js.
   Zwei Karten in der Video-Ansicht: "Wer hat freigegeben" (Zeitleiste) und "Okay von oben"
   (Schalter, Name, Link). Am Computer unter den Freigabe-Knoepfen, am Handy kompakt unter
   dem Freigeben-Knopf (Klasse fp-kompakt).
   Look wie der Rest des Portals: Funnel Display 400/600, Konturen 1 px, keine Schatten,
   Farben nur ueber Theme-Variablen. Gruen nur fuer "freigegeben" und "Okay", sonst neutral.
   Praefix fp-, damit nichts mit der Seite kollidiert. Ohne Migration bleibt alles leer. */

.fp-host:empty { display: none; }
.fp-host { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-5); font-family: var(--font-body); color: var(--text-primary, #F4F4F4); }
.fp-host *, .fp-host *::before, .fp-host *::after { box-sizing: border-box; }
/* Der Computer-Block bleibt am Handy weg: dort zeichnet deliveries-handy.js den kompakten Block */
@media (max-width: 767px) { html.pjh .fp-host[data-fp-host="gross"] { display: none; } }

.fp-karte { border: 1px solid var(--kontur, rgba(244,244,244,0.2)); border-radius: var(--radius-md); padding: 20px; background: transparent; }
.fp-h { font-family: var(--font-body); font-size: var(--t-body); font-weight: 600; letter-spacing: 0; text-transform: none; margin: 0 0 var(--space-3); color: var(--text-primary, #F4F4F4); }
.fp-text { font-size: var(--t-body-s); line-height: 1.5; color: var(--text-secondary, #B4B4AE); margin: 0; overflow-wrap: anywhere; }
.fp-meta { font-size: var(--t-meta); font-weight: 600; color: var(--text-muted, #8A8A84); }
.fp-leer { font-size: var(--t-body-s); color: var(--text-secondary, #B4B4AE); margin: 0; }

/* ---- Zeitleiste ---- */
.fp-zeitleiste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fp-eintrag { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--space-3); position: relative; padding-bottom: var(--space-4); }
.fp-eintrag:last-child { padding-bottom: 0; }
.fp-eintrag:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line, rgba(244,244,244,0.12)); }
.fp-punkt { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--kontur, rgba(244,244,244,0.2)); background: var(--bg-body, #0A0708); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: var(--text-secondary, #B4B4AE); }
.fp-punkt .material-symbols-outlined { font-size: 14px; color: inherit !important; }
.fp-eintrag.fp-ok .fp-punkt { background: var(--ok, #5DBB85); border-color: var(--ok, #5DBB85); color: var(--ok-fg, #0A0708); }
.fp-zeit { font-size: var(--t-meta); font-weight: 600; color: var(--text-muted, #8A8A84); font-variant-numeric: tabular-nums; }
.fp-satz { font-size: var(--t-body-s); line-height: 1.35; font-weight: 600; color: var(--text-primary, #F4F4F4); overflow-wrap: anywhere; }
.fp-sub { display: block; font-size: var(--t-meta); font-weight: 400; color: var(--text-secondary, #B4B4AE); margin-top: 2px; }
.fp-zitat { display: block; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--text-primary, #F4F4F4); margin-top: var(--space-1); padding-left: 10px; border-left: 2px solid var(--kontur, rgba(244,244,244,0.2)); overflow-wrap: anywhere; white-space: pre-wrap; }
.fp-mehr { margin-top: var(--space-3); }

/* ---- Knoepfe: Kontur-Pille, wie die Freigabe-Knoepfe des Portals ---- */
.fp-knopf { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: transparent; color: var(--text-primary, #F4F4F4); box-shadow: inset 0 0 0 1px var(--kontur, rgba(244,244,244,0.2));
  font-family: var(--font-body); font-size: var(--t-body-s); font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: transform .15s cubic-bezier(.16,1,.3,1), opacity .15s ease; }
.fp-knopf:active { transform: scale(.98); }
.fp-knopf:focus-visible, .fp-schalter:focus-visible, .fp-feld:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 2px; }
.fp-knopf[disabled] { opacity: .5; cursor: default; transform: none; }
.fp-knopf .material-symbols-outlined { font-size: 18px; color: inherit !important; }
@media (hover: hover) and (pointer: fine) { .fp-knopf:not([disabled]):hover { opacity: .85; } }

/* ---- Schalter ---- (die ganze Zeile ist der Schalter, mindestens 56 px hoch; gezeichnet wird eine Spur von 44 x 26) */
.fp-zeile { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 56px; width: 100%; }
.fp-schalter { border: 0; background: transparent; cursor: pointer; padding: 0; margin: 0; text-align: left; color: inherit; font: inherit; touch-action: manipulation; border-radius: var(--radius-md); -webkit-tap-highlight-color: transparent; }
.fp-schalter .fp-bez { font-size: var(--t-body); font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.fp-spur { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; border: 1px solid var(--kontur, rgba(244,244,244,0.2)); background: transparent; box-sizing: border-box; transition: background .15s ease; }
.fp-spur::after { content: ''; position: absolute; top: 3px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted, #8A8A84); transition: transform .15s ease, background .15s ease; }
.fp-schalter[aria-checked="true"] .fp-spur { background: var(--ok, #5DBB85); border-color: var(--ok, #5DBB85); }
.fp-schalter[aria-checked="true"] .fp-spur::after { transform: translateX(18px); background: var(--ok-fg, #0A0708); }
.fp-schalter[disabled] { opacity: .5; cursor: default; }
/* Schalter aus: nur diese eine Zeile, ruhig und flach */
.fp-karte.fp-schmal { padding: 0 20px; }
.fp-kompakt.fp-schmal { padding: 0 var(--space-4); }
.fp-karte:not(.fp-schmal) > .fp-zeile { margin-bottom: var(--space-1); }

/* ---- Okay von oben ---- */
.fp-okay { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); }
.fp-feldzeile { display: flex; flex-direction: column; gap: var(--space-2); }
.fp-feld-label { font-size: var(--t-meta); font-weight: 600; color: var(--text-secondary, #B4B4AE); }
.fp-feld { width: 100%; min-height: 48px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--kontur, rgba(244,244,244,0.2)); background: var(--input-bg, transparent); color: var(--text-primary, #F4F4F4);
  font-family: var(--font-body); font-size: 16px; }
.fp-feld::placeholder { color: var(--text-muted, #8A8A84); }
.fp-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.fp-link { border: 1px solid var(--line, rgba(244,244,244,0.12)); border-radius: var(--radius-md); padding: 14px; background: var(--bg-s2, #1E1A1C); display: flex; flex-direction: column; gap: 10px; }
.fp-link-name { font-size: var(--t-body-s); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.fp-link-stand { font-size: 14px; color: var(--text-secondary, #B4B4AE); margin: 0; font-variant-numeric: tabular-nums; }
.fp-link-stand b { font-weight: 600; color: var(--text-primary, #F4F4F4); }
.fp-link-stand.fp-gut b { color: var(--ok, #5DBB85); }
.fp-manuell .fp-feld { font-size: 14px; }
.fp-link-knoepfe { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fp-link-knoepfe .fp-knopf { flex: 1 1 auto; }

/* Zustandszeile unter dem Status ("Freigegeben, wartet auf Okay von ...") */
.fp-wartet { margin: var(--space-2) 0 0; font-size: var(--t-body-s); font-weight: 600; color: var(--text-primary, #F4F4F4); }
.fp-wartet:empty { display: none; }
.fp-wartet .material-symbols-outlined { font-size: 18px; vertical-align: -3px; margin-right: 6px; color: inherit !important; }
.fp-wartet.fp-da { color: var(--ok, #5DBB85); }

/* ---- Handy, kompakt ---- */
.fp-kompakt { padding: var(--space-4); border-radius: var(--radius-md); }
.fp-kompakt .fp-h { font-size: var(--t-body); margin-bottom: var(--space-3); }
.fp-kompakt .fp-knopf { min-height: 48px; }
.fp-kompakt .fp-link-knoepfe .fp-knopf { min-height: 44px; }
.fp-host.fp-handy { margin-top: var(--space-5); gap: var(--space-3); }

@media (prefers-reduced-motion: reduce) {
  .fp-knopf, .fp-spur, .fp-spur::after { transition: none !important; }
}

/* Hell-Thema: theme.js faerbt jedes <p> grau (!important). Unsere Zustandszeile bleibt in Hauptfarbe bzw. Gruen. */
html[data-theme="light"] p.fp-wartet { color: var(--text-primary, #0A0708) !important; }
html[data-theme="light"] p.fp-wartet.fp-da { color: var(--ok, #2E7D4F) !important; }
/* Status-Schild am Computer, solange das Okay fehlt: Kontur statt orange (Kontrast in hell und dunkel) */
.badge.fp-chip-wartet { background: transparent !important; color: var(--text-primary, #F4F4F4) !important; box-shadow: inset 0 0 0 1px var(--kontur, rgba(244,244,244,0.35)) !important; }
