/* T-260: THE passport viewer's look (src/core/passport-view.js) — the website's and the extension's (the build copies it unchanged). The
   page's own tokens (--surface, --ink, --line, --brand, --warn…), so light and dark follow the page. */
.pv-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim-viewer); }
.pv { box-sizing: border-box; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-s, 10px);
  box-shadow: var(--shadow-pop); }
.pv:focus { outline: none; }
.pv-head { display: flex; align-items: center; gap: 8px; }
.pv-title { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.pv-close { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pv-stage { position: relative; height: min(62vh, 560px); min-height: 220px; overflow: hidden; border-radius: 8px; background: var(--viewer-bg); touch-action: none; user-select: none; }
.pv-stage.pv-zoomed { cursor: grab; }
.pv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; transition: transform .12s ease-out; -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) { .pv-img { transition: none; } }
.pv-msg { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; color: var(--viewer-ink); }
.pv-zoom { display: flex; align-items: center; gap: 6px; }
.pv-zoom button { min-width: 40px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: inherit; font-size: 1rem; cursor: pointer; }
.pv-zoom button:disabled { opacity: .45; cursor: default; }
.pv-pct { margin-left: 4px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: .9rem; }
.pv-note, .pv-sub { margin: 0; color: var(--ink-2); font-size: .9rem; }
.pv-fields { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.pv-f { min-width: 0; }
.pv-f dt { color: var(--ink-2); font-size: .8rem; }
.pv-f dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* item 42: the passport number masked until Show (a 44 px tall touch target, the shared tokens only) */
.pv-f dd.pv-maskrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-show { min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.pv-show:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pv-warn dd { color: var(--warn); }
.pv-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pv-act { height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); color: inherit; cursor: pointer; }
.pv-act:disabled { opacity: .45; cursor: not-allowed; }   /* 07 Nov: Previous on the first guest */
.pv-act.primary { background: var(--btn); border-color: transparent; color: var(--btn-ink); }   /* Q-4: text ON the button's own colour; T-512 Q1: an ordinary filled button is black (white in dark) */
/* T-610: the details editable under the photo (the card's own fields, GuestCard.viewEditor). The photo stays in sight while she types: it
   sticks to the top of the scrolling dialog, a little shorter */
.pv.pv-editing .pv-stage { position: sticky; top: -14px; z-index: 1; height: min(44vh, 440px); }
.pv .pv-edit .g-fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }   /* the open card's own two columns on a phone */
.pv.pv-editing .pv-actions { position: sticky; bottom: -16px; z-index: 1; padding: 10px 0 2px; background: var(--surface); flex-wrap: nowrap; }
.pv.pv-editing .pv-actions .pv-act { flex: 0 1 auto; width: auto; min-width: 96px; }   /* Cancel + Save side by side at every width (a surface's full-width .primary never splits them) */
/* the card's button (THE card draws it in the open card) */
.g-view-btn { white-space: nowrap; }
@media (max-width: 480px) { .pv-back { padding: 0; } .pv { max-height: 100vh; height: 100vh; border-radius: 0; } .pv-stage { height: 55vh; } .pv.pv-editing .pv-stage { height: 34vh; } }
/* T-269: the rich view (mount / turn / focus / maxZoom options): the photo upright in a pan box, scaled by stage pixels; the guest viewer above is untouched */
.pv-inline { width: 100%; height: 100%; max-height: none; padding: 0; gap: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: hidden; }
.pv-inline .pv-stage { flex: 1 1 auto; height: 100%; min-height: 0; border-radius: 0; }
.pv-rich { cursor: grab; }
.pv-rich:active { cursor: grabbing; }
.pv-rich:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pv-rich .pv-pan { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.pv-rich .pv-img { position: absolute; inset: auto; left: 50%; top: 50%; width: auto; height: auto; max-width: none; max-height: none; object-fit: fill; transform-origin: 50% 50%; transition: none; }
