/* FleetLeeds photo module styles (lane photos). Small-first (360 px). Colours come from the shell's --ux-* variables, with fallbacks so the module also works alone.
   The shell stylesheet is written by lane eflow; this file only adds the ux-ph-* parts. No colour literal is used outside a var() fallback. */
.ux-ph {
  --ph-accent: var(--ux-accent, #0b57d0);
  --ph-on-accent: var(--ux-on-accent, #ffffff);
  --ph-fg: var(--ux-fg, #1b1f23);
  --ph-muted: var(--ux-muted, #5b6470);
  --ph-bg: var(--ux-surface, #ffffff);
  --ph-tile-bg: var(--ux-surface-2, #eef1f5);
  --ph-border: var(--ux-border, #c3cad3);
  --ph-ok: var(--ux-ok, #1a7f37);
  --ph-bad: var(--ux-danger, #b3261e);
  --ph-radius: var(--ux-radius, 12px);
  display: block;
  color: var(--ph-fg);
  font-size: 1rem;
}

.ux-ph-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

.ux-ph-take {
  flex: 0 0 96px; width: 96px; height: 96px; min-height: 48px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 6px; border: 2px dashed var(--ph-accent); border-radius: var(--ph-radius);
  background: var(--ph-tile-bg); color: var(--ph-accent); cursor: pointer; font: inherit; text-align: center;
}
.ux-ph-take[aria-disabled="true"] { opacity: 0.55; }
.ux-ph-take-icon { width: 32px; height: 32px; }
.ux-ph-take-text { display: flex; flex-direction: column; line-height: 1.15; }
.ux-ph-take-main { font-size: 0.8125rem; font-weight: 600; }
.ux-ph-take-sub { font-size: 0.6875rem; color: var(--ph-muted); }

.ux-ph-tiles { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.ux-ph-item { position: relative; width: 72px; height: 72px; }

.ux-ph-tile {
  position: relative; display: block; width: 72px; height: 72px; padding: 0; overflow: hidden;
  border: 1px solid var(--ph-border); border-radius: var(--ph-radius); background: var(--ph-tile-bg); cursor: pointer;
}
.ux-ph-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.ux-ph-ring, .ux-ph-check, .ux-ph-warn {
  position: absolute; right: 4px; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; display: none;
  background: var(--ph-bg);
}
.ux-ph-ring-bg { stroke: var(--ph-border); }
.ux-ph-ring-fg { stroke: var(--ph-accent); transition: stroke-dashoffset 0.2s linear; }
.ux-ph-tile[data-state="preparing"] .ux-ph-ring,
.ux-ph-tile[data-state="uploading"] .ux-ph-ring { display: block; }
.ux-ph-tile[data-state="done"] .ux-ph-check { display: block; color: var(--ph-ok); padding: 3px; box-sizing: border-box; }
.ux-ph-tile[data-state="failed"] .ux-ph-warn { display: block; color: var(--ph-bad); padding: 3px; box-sizing: border-box; }
.ux-ph-tile[data-state="failed"] { border-color: var(--ph-bad); }

/* 44 px remove target in the tile corner (the visual X is smaller; the button is the full 44 px) */
.ux-ph-x {
  position: absolute; top: -10px; right: -10px; width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; color: var(--ph-fg);
}
.ux-ph-x-icon { width: 22px; height: 22px; padding: 3px; box-sizing: border-box; border-radius: 50%; background: var(--ph-bg); border: 1px solid var(--ph-border); }

.ux-ph-library {
  display: inline-block; margin-top: 8px; min-height: 48px; padding: 0 4px; border: 0; background: transparent;
  color: var(--ph-accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.ux-ph-library[aria-disabled="true"] { opacity: 0.55; }

.ux-ph-status { display: block; min-height: 24px; margin: 4px 0 0; padding: 0; border: 0; background: transparent; font: inherit; font-size: 0.875rem; color: var(--ph-muted); text-align: left; }
.ux-ph-status[data-state="failed"] { color: var(--ph-bad); font-weight: 600; min-height: 48px; text-decoration: underline; cursor: pointer; }
.ux-ph-status[hidden], .ux-ph-error[hidden], .ux-ph-full[hidden] { display: none; }
.ux-ph-error { margin: 4px 0 0; color: var(--ph-bad); font-size: 0.9375rem; }

/* announced to screen readers only: the visible status line already says the same */
.ux-ph-live, .ux-ph-input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* full-screen view */
.ux-ph-lock { overflow: hidden; }
.ux-ph-full {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--ux-scrim, #000000); color: var(--ph-on-accent);
}
.ux-ph-full-img { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; }
.ux-ph-full-bar { display: flex; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.ux-ph-btn { flex: 1 1 0; min-height: 48px; border-radius: var(--ph-radius); font: inherit; font-weight: 600; cursor: pointer; border: 2px solid var(--ph-on-accent); background: transparent; color: var(--ph-on-accent); }
.ux-ph-btn-done { background: var(--ph-accent); border-color: var(--ph-accent); }

.ux-ph button:focus-visible, .ux-ph-full button:focus-visible { outline: 3px solid var(--ux-focus, #f5a623); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ux-ph-ring-fg { transition: none; } }

/* signed gallery page (Ux/photo.ashx, token purpose "photos") */
.ux-gallery-page { margin: 0; background: var(--ux-bg, #ffffff); color: var(--ux-fg, #1b1f23); font: 1rem/1.4 system-ui, sans-serif; }
.ux-gallery { max-width: 480px; margin: 0 auto; padding: 16px; display: grid; gap: 12px; }
.ux-gallery-title { margin: 0; font-size: 1.25rem; }
.ux-gallery-link { display: block; }
.ux-gallery-img { display: block; width: 100%; height: auto; border-radius: 12px; }
