/* FF Receipt Guard – form UI. Inherits the theme's fonts and colours where possible. */
.ffrg-box { margin-top: 10px; font-size: 0.95em; line-height: 1.45; }
.ffrg-status:empty { display: none; }
.ffrg-status { padding: 10px 12px; border-radius: 6px; border-left: 4px solid currentColor; background: rgba(0, 0, 0, 0.04); }
.ffrg-reading { color: #5a5a5a; }
.ffrg-ok { color: #1f6f3f; background: rgba(31, 111, 63, 0.08); }
.ffrg-error { color: #a12a1e; background: rgba(161, 42, 30, 0.07); }
.ffrg-manual { margin-top: 12px; padding: 12px; border: 1px dashed rgba(0, 0, 0, 0.25); border-radius: 6px; }
.ffrg-manual[hidden] { display: none; }
.ffrg-manual-intro { margin: 0 0 10px; font-weight: 600; }
.ffrg-manual-cols { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ffrg-guide { display: flex; gap: 10px; align-items: flex-start; flex: 0 0 auto; }
.ffrg-guide > img { width: 200px; max-width: 46vw; height: auto; }
.ffrg-photo img { display: block; width: 120px; max-width: 30vw; height: auto; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.ffrg-photo[hidden] { display: none; }
.ffrg-fields { flex: 1 1 220px; min-width: 0; }
.ffrg-fields label { display: block; margin: 0 0 4px; font-weight: 600; }
.ffrg-fields input { width: 100%; margin: 0 0 12px; box-sizing: border-box; }
@media (max-width: 480px) {
  .ffrg-manual-cols { flex-direction: column; }
  .ffrg-guide > img { width: 170px; max-width: 55vw; }
}

/* Live camera scanner */
.ffrg-cam-btn { display: block; width: 100%; margin: 0 0 12px; padding: 14px 16px; font-size: 1.05em; font-weight: 700; line-height: 1.2; cursor: pointer; border-radius: 6px; }
html.ffrg-cam-open, html.ffrg-cam-open body { overflow: hidden !important; }
.ffrg-cam { position: fixed; inset: 0; z-index: 2147483000; background: #000; color: #fff; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; }
.ffrg-cam [hidden] { display: none !important; }
.ffrg-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ffrg-cam-frame { position: absolute; left: 50%; top: 46%; width: min(68vw, 52vh); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); border: 3px solid rgba(255, 255, 255, 0.95); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.38); transition: width 0.3s, aspect-ratio 0.3s; pointer-events: none; }
.ffrg-cam.ffrg-step2 .ffrg-cam-frame { width: min(80vw, 45vh); aspect-ratio: 9 / 16; border-color: #5fd38d; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.15); }
.ffrg-cam-hint { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 14px; right: 70px; padding: 10px 14px; background: rgba(0, 0, 0, 0.62); border-radius: 12px; font-weight: 600; }
.ffrg-cam-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 20px; line-height: 46px; cursor: pointer; }
.ffrg-cam-chip { position: absolute; left: 14px; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); padding: 10px 14px; border-radius: 12px; background: rgba(31, 128, 72, 0.94); text-align: center; font-weight: 600; }
.ffrg-cam-chip.ffrg-warn { background: rgba(176, 42, 30, 0.94); }
.ffrg-cam-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 18px; }
.ffrg-cam-shutter { min-width: 170px; height: 58px; padding: 0 26px; border: 0; border-radius: 29px; background: #fff; color: #111; font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
.ffrg-cam-shutter:disabled { opacity: 0.45; }
.ffrg-cam-torch { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.22); font-size: 24px; cursor: pointer; }
.ffrg-cam-torch.ffrg-on { background: #ffd54a; }
