/* P5-60 PHOTO RECEIVED (R-1011-24, JD 2026-10-11 2:37-2:43 PM): the
   hurricane with the blue lightning is the ONE waiting picture.
   .buffer-overlay = large, over the photo it waits on (96 %, centred, light
   scrim), one turn every 1.5 s, counter-clockwise - "spinning at a rate that
   person can tell". .buffer = 28 px, only on a status line that waits.
   img/hurricane-512.png is the TRANSPARENT one (JD 3:02 PM: no square frame).
   Behaviour: web/photo-received.js. */

@keyframes pr-hspin { to { transform: rotate(-360deg); } }

/* hidden always wins (the DVIR lesson, 2026-09-25) - on pages without a
   global [hidden] rule too */
.pr-wrap[hidden], .pr-line[hidden], button.pr-upload[hidden], dialog.pr-warn:not([open]) { display: none !important; }

.pr-wrap { position: relative; display: block; width: fit-content; max-width: 100%;
  min-width: 160px; min-height: 120px; margin: 0 auto var(--sp-2, 16px) auto; }
.pr-wrap img.photo { margin-bottom: 0; }
/* p5-69: a wide defect photo fits the phone (390 / 320) and never widens the page;
   the overlay (inset: 0 on .pr-wrap) still covers the whole preview */
.pr-wrap img.photo { display: block; max-width: 100%; height: auto; }
.rp-block { max-width: 100%; overflow-x: hidden; }
/* p5-69: the native file control hides behind the app's own "Take a photo" button */
.rp-take input[type="file"], .rp-take input[hidden] { display: none !important; }
label.rp-take { display: inline-block; min-height: 44px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid currentColor; cursor: pointer; }

.buffer-overlay { position: absolute; inset: 0; z-index: 5; display: flex;
  align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .35);
  border-radius: inherit; overflow: hidden; pointer-events: none; }
.buffer-overlay[hidden] { display: none !important; }
.buffer-overlay .hur { position: absolute; inset: 2%;            /* 96 % of the photo */
  background: url(img/hurricane-512.png) center / contain no-repeat;
  animation: pr-hspin 1.5s linear infinite; }
.buffer-overlay .bt { position: relative; margin-bottom: 6%; color: #fff;
  font: 800 26px/1.15 var(--font-ui, -apple-system, sans-serif); text-align: center;
  text-shadow: 0 2px 8px #000, 0 0 18px #000; }
/* P5-60C: on the Storm Time receipt dialog the photo can be small and the
   26 px caption wrapped onto two lines over it. There it is one line that
   scales with the overlay's width (cqw = 1 % of it), never above 26 px.
   The hurricane (.hur) is untouched: same size, frameless, spinning. */
html body.stormtime #rdlg .buffer-overlay { container-type: inline-size; }
html body.stormtime #rdlg .buffer-overlay .bt { white-space: nowrap; max-width: 96%;
  font-size: clamp(10px, 6.5cqw, 26px); }

.buffer { display: inline-block; width: 28px; height: 28px; flex: none; vertical-align: middle;
  background: url(img/hurricane-512.png) center / contain no-repeat;
  animation: pr-hspin 1.5s linear infinite; margin-right: 8px; }

/* JD asked for it to spin: it spins even when the phone asks for less motion */

/* UPLOAD: big amber; received: the green stamp */
button.pr-upload { min-height: var(--tap-primary, 64px); font-size: 22px; font-weight: 800;
  letter-spacing: .06em; background: #FFB020; border-color: #FFB020; color: #000; }
button.pr-upload.pr-got { background: #1E8E3E; border-color: #1E8E3E; color: #fff;
  text-transform: uppercase; font-size: 18px; }
button.pr-upload[disabled]:not(.pr-got) { opacity: .6; }
/* P5-60C: Storm Time's UPLOAD (and its OFFICE RECEIVED / NOT RECEIVED
   states, the same button) full width, as on the GF receipt page */
html body.stormtime #rdlg button.pr-upload { display: block; width: 100%; }

.pr-line { display: flex; align-items: center; min-height: 28px; margin: 0 0 var(--sp-1, 8px) 0;
  font-weight: 800; font-size: 17px; }
.pr-line.ok { color: #1E8E3E; text-transform: uppercase; }
.pr-line.no { color: #D93025; }
.pr-line.part { color: #B26A00; }

/* the list row on the receipts page */
.pr-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tap-gap, 8px);
  margin-bottom: var(--sp-1, 8px); }
.pr-row .pr-what { flex: 1 1 60%; }
.pr-row .pr-line { flex: 1 1 100%; margin: 0; }
.pr-row button.pr-upload { flex: 1 1 100%; margin-bottom: 0; }

/* the back-out WARNING (one button) */
dialog.pr-warn { max-width: 520px; width: 92vw; border: 3px solid #D93025; border-radius: 16px;
  padding: 18px; background: var(--c-bg, #fff); color: var(--c-text, #000); }
dialog.pr-warn::backdrop { background: rgba(0, 0, 0, .7); }
.pr-warn-text { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 0 0 16px 0; }
button.pr-warn-ok { min-height: var(--tap-primary, 64px); background: #D93025; border-color: #D93025;
  color: #fff; font-weight: 800; font-size: 18px; }
