/* TaTasche — the shared PHOTO VIEWER (public/photo-viewer/photo-viewer.js; extracted from SAFETY's 1286b viewer for ASSETS AS-2).
 * Copyright Rapid Surveys Pty Ltd. Styled by [data-pv-part] (never a host's class), with the SAME values as SAFETY's .ql-* rules in
 * public/safety/safety.css, so a screen that has both looks exactly as before. App tokens only. Every tap target ≥ 44 px. */
[data-pv-part=main] { display: flex; align-items: center; gap: 6px; }
[data-pv-part=mainimg] { flex: 1; min-width: 0; height: 240px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: zoom-in; overflow: hidden; }
@media (min-width: 760px) { [data-pv-part=mainimg] { height: 300px; } }
[data-pv-part=mainimg] img { display: block; width: 100%; height: 100%; object-fit: contain; }
[data-pv-part=mainimg]:focus-visible, [data-pv-part=line]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[data-pv-part=step] { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); font-size: 24px; line-height: 1; }
[data-pv-part=count] { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
[data-pv-part=list] { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
[data-pv-part=line], [data-pv-part=addline] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); text-align: left; font-weight: 500; font-size: 14px; text-decoration: none; cursor: pointer; }
[data-pv-part=line] img { width: 48px; height: 34px; object-fit: contain; border-radius: 4px; background: var(--bg); flex: none; }
[data-pv-part=line][aria-current="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); font-weight: 700; }
[data-pv-part=pdficon] { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 34px; flex: none; border-radius: 4px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; }
[data-pv-part=addline] { border-style: dashed; color: var(--accent); }
[data-pv-part=viewov] { position: fixed; inset: 0; z-index: 995; display: flex; align-items: center; justify-content: center; background: #0b0d10; }
[data-pv-part=view] { display: flex; flex-direction: column; width: min(100%, 960px); max-height: 100%; height: 100%; color: #fff; outline: none; }
[data-pv-part=view-top] { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; font-weight: 600; }
[data-pv-part=x] { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 22px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; cursor: pointer; }
[data-pv-part=view-body] { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 12px; }
[data-pv-part=view-body] img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #222; }
[data-pv-part=view-pdf] { font-size: 18px; margin: 0; }
[data-pv-part=view-msg] { margin: 6px 12px 0; }
[data-pv-part=view-bar] { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 12px 12px max(12px, env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .55); }
[data-pv-part=view-bar] > span { width: 100%; text-align: center; }
/* the default buttons + hint (a host passes its own classes: SAFETY sf-chip / sf-danger / sf-primary / sf-hint) */
.pv-chip, .pv-primary { width: auto; margin: 0; min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pv-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.pv-danger { color: var(--err); }
.pv-chip:disabled { opacity: .45; cursor: default; }
.pv-hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
