/**
 * RudiScanKamera — Sucher mit Fuehrungsrahmen (siehe /shared/scan-kamera.js)
 * Eigenstaendig: nutzt keine Modul-Variablen, damit es auf jeder Seite gleich aussieht.
 */
.rsk-overlay {
  position: fixed; inset: 0; z-index: 3000; background: #000;
  display: none; flex-direction: column;
}
.rsk-overlay.show { display: flex; }
.rsk-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rsk-overlay.blitz::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0.7; z-index: 5; }

.rsk-maske {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; pointer-events: none;
}
.rsk-overlay.mit-rahmen .rsk-maske { display: flex; }
.rsk-rahmen {
  /* 05.08.2026 vergroessert (GF): mit 78vw/62vh musste das Geraet so weit weg
     gehalten werden, dass der Lieferschein kaum noch lesbar war. Jetzt fuellt
     der Rahmen die Flaeche zwischen Hinweiszeile und Bedienleiste nahezu aus. */
  width: min(92vw, calc(74vh / 1.414)); aspect-ratio: 1 / 1.414;  /* A4 hochkant */
  border: 3px dashed rgba(52,199,89,0.95); border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,0.45);
  transition: border-color 0.2s ease;
}
.rsk-rahmen.schief { border-color: rgba(255,69,58,0.95); }

/* Startzustand: Auslöser gesperrt, solange kein Livebild da ist */
.rsk-startet {
  position: absolute; inset: 0; z-index: 3;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
}
.rsk-overlay.startet .rsk-startet { display: flex; }
.rsk-overlay.startet .rsk-rahmen { opacity: 0.35; }
.rsk-spinner {
  width: 34px; height: 34px;
  border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff;
  border-radius: 50%; animation: rskSpin 0.9s linear infinite;
}
@keyframes rskSpin { to { transform: rotate(360deg); } }

.rsk-hinweis {
  position: absolute; top: max(18px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  max-width: 90vw; padding: 10px 16px; border-radius: 12px;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 0.95rem; text-align: center;
  z-index: 4;
}
.rsk-leiste {
  position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); left: 0; right: 0;
  display: flex; align-items: center; justify-content: center; gap: 26px; z-index: 4;
}
.rsk-ausloeser {
  width: 68px; height: 68px; border-radius: 50%;
  border: 5px solid #fff; background: rgba(255,255,255,0.35); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rsk-ausloeser:disabled { border-color: rgba(255,255,255,0.35); background: rgba(255,69,58,0.25); cursor: not-allowed; }
.rsk-btn {
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: none;
  color: #fff; font-size: 0.95rem; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rsk-abbrechen { background: rgba(255,255,255,0.18); }
.rsk-fertig { background: rgba(52,199,89,0.9); font-weight: 600; min-width: 74px; }
.rsk-fertig:active { background: rgba(52,199,89,1); }
