/* ep_kamera.css — Live-Kamera im E-Protokoll (Session „Elektroprotokoll", 05.12.2026; zu ep_kamera.js). */

/* Knopf im Kopf des E-Protokolls, neben dem Menü */
#ep-dialog .epk-knopf { color: var(--akzent); margin-left: auto; }
#ep-dialog .epk-knopf:not([hidden]) + #ep-menue-knopf { margin-left: 0; }
/* am Handy ordnet eprotokoll.css den Kopf mit order: gleiche Stufe wie das Menü, im DOM steht die Kamera davor */
@media (max-width: 640px) {
  #ep-dialog .epk-knopf { order: 4; }
  #ep-dialog:not(.ep-rahmen) .epk-knopf { width: 34px; height: 34px; }
  #ep-dialog.ep-rahmen .epk-knopf { order: 2; }
}
#ep-dialog .epk-knopf[hidden] { display: none; }

/* frisch eingetragenes Feld blinkt kurz grün */
#ep-dialog .ep-feld.ep-kam-neu { animation: epk-blink 2.4s ease-out; }
@keyframes epk-blink {
  0%, 30% { background: #d6f5dd; box-shadow: 0 0 0 3px var(--gut); }
  100% { background: inherit; box-shadow: none; }
}

/* Vollbild mit Live-Bild; am PC ein Handy-großes Fenster */
dialog.epk-dialog { width: min(480px, 100vw); height: min(920px, 100dvh); max-width: 100vw; max-height: 100dvh;
  padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: #000; color: #fff; }
dialog.epk-dialog[open] { display: block; }
dialog.epk-dialog::backdrop { background: rgba(0, 0, 0, .7); }
@media (max-width: 640px) { dialog.epk-dialog { width: 100vw; height: 100dvh; border-radius: 0; } }

.epk-bild { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.epk-bild video, .epk-bild img { width: 100%; height: 100%; object-fit: cover; }
.epk-bild img { object-fit: contain; }
.epk-ohne { max-width: 300px; text-align: center; padding: 1rem; color: #fff; }
.epk-ohne p { margin: 0 0 1rem; line-height: 1.45; }
.epk-ohne .haupt { min-height: 48px; padding: 0 1.4rem; }

/* oben: wohin der Wert kommt */
.epk-oben { position: absolute; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top));
  background: #fff; color: var(--text); border-radius: 18px; padding: .65rem .8rem .7rem; }
.epk-oben-zeile { display: flex; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--leise); }
.epk-oben-zeile #epk-fotos { color: #1f7a37; }
.epk-oben-zeile #epk-fotos.epk-rot { color: var(--schlecht); }
.epk-ziel-name { font-size: 1.15rem; font-weight: 600; margin: .1rem 0 .5rem; }
.epk-ziel-name small { font-size: .8rem; font-weight: 400; color: var(--leise); }
.epk-ziel-chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.8rem; padding: 0 .8rem; }
.epk-ziel-chips::-webkit-scrollbar { display: none; }
.epk-zchip { flex: none; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .85rem; font-weight: 500; padding: .4rem .75rem; border-radius: 999px; border: 0;
  background: var(--grund); color: var(--text); }
.epk-zchip.an { background: var(--akzent); color: #fff; }
.epk-zchip.epk-alle { color: var(--akzent); }

/* unten: Status, gelesene Werte, Meldung, Fertig + Kreuz */
.epk-unten { position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: .6rem; pointer-events: none; }
.epk-unten > * { pointer-events: auto; }
.epk-status { align-self: center; display: flex; align-items: center; gap: .5rem; max-width: 100%;
  background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: .4rem .9rem; font-size: .86rem; text-align: center; }
.epk-status:empty { display: none; }
.epk-status.rot { background: rgba(229, 72, 77, .92); }
.epk-dreh { flex: none; width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff; animation: epk-dreh .8s linear infinite; }
@keyframes epk-dreh { to { transform: rotate(360deg); } }
.epk-werte { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.epk-werte:empty { display: none; }
.epk-wert { display: flex; flex-direction: column; align-items: center; gap: .05rem; min-width: 7.5rem;
  padding: .55rem 1rem; border-radius: 16px; background: #fff; color: var(--text); border: 3px solid transparent; }
.epk-wert b { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.epk-wert b small { font-size: .95rem; font-weight: 500; }
.epk-wert span { font-size: .75rem; color: var(--leise); }
.epk-wert.passt { border-color: var(--akzent); }
.epk-wert:active { transform: scale(.97); }
/* Meldung „eingetragen" oben in der Karte — unten würde sie die Wert-Knöpfe verschieben (daneben getippt) */
.epk-toast { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .6rem;
  background: #eaf8ee; color: #1f7a37; border-radius: 14px; padding: .65rem .85rem; font-size: .92rem; }
.epk-toast[hidden] { display: none; }
.epk-toast.rot { background: #fdecec; color: var(--schlecht); }
.epk-zurueck { flex: none; background: none; border: 0; padding: .2rem 0; color: var(--akzent); font-weight: 600; font-size: .92rem; }
.epk-fuss { display: flex; align-items: center; gap: .6rem; }
.epk-fertig { flex: 1; min-height: 52px; border-radius: 14px; border: 0; background: #fff; color: var(--akzent);
  font-size: 1.05rem; font-weight: 600; }
.epk-zu { flex: none; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 0; background: var(--rand); color: #e5484d;
  display: flex; align-items: center; justify-content: center; }
.epk-zu svg { width: 24px; height: 24px; }
.epk-zu svg path { stroke-width: 2.2; }
.epk-zu.klein { width: 38px; height: 38px; }
.epk-zu.klein svg { width: 20px; height: 20px; }

/* „Alle …": alle Felder des Protokolls zum Auswählen */
.epk-liste { position: absolute; inset: auto 0 0 0; max-height: 78%; display: flex; flex-direction: column;
  background: #fff; color: var(--text); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
.epk-liste[hidden] { display: none; }
.epk-liste-kopf { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem .6rem;
  border-bottom: .5px solid var(--rand); }
.epk-liste-inhalt { overflow: auto; }
.epk-lzeile { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .6rem; border: 0; border-radius: 0;
  background: none; color: var(--text); padding: .75rem 1rem; text-align: left; font-size: .95rem; }
.epk-lzeile + .epk-lzeile { border-top: .5px solid var(--rand); }
.epk-lzeile small { color: var(--leise); white-space: nowrap; }
.epk-lzeile.an { background: #eef5ff; }
.epk-lzeile.an span { color: var(--akzent); font-weight: 600; }
