/* Aurex live camera (camera-capture.js) and the Start / End visit windows. Light and dark come from the theme tokens. */

.cam { display: flex; flex-direction: column; gap: 12px; }
.cam-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 32vh; overflow: hidden; border-radius: 16px; background: #0B0B0D; border: 1px solid var(--line, #E6E4DE); display: flex; align-items: center; justify-content: center; }
.cam-video, .cam-prev, .cam-prev img { width: 100%; height: 100%; object-fit: contain; display: block; background: #0B0B0D; }
.cam-video[hidden], .cam-prev[hidden], .cam-state[hidden] { display: none; }
.cam-mirror { transform: scaleX(-1); }                               /* the live selfie preview looks like a mirror; the saved photo is not flipped */
.cam-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; text-align: center; background: #111214; color: #F3EFE7; font-size: 14px; line-height: 1.45; }
.cam-state .cam-msg-t { max-width: 34ch; color: #F3EFE7; }
.cam-state .btn { background: #F3EFE7; color: #141518; border-color: #F3EFE7; }
.cam-state .btn.btn-primary { background: var(--gold, #C6A15B); border-color: var(--gold, #C6A15B); color: #1A1305; }
.cam-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(243,239,231,.3); border-top-color: #F3EFE7; animation: cam-spin .8s linear infinite; margin-right: 8px; vertical-align: -3px; }
@keyframes cam-spin { to { transform: rotate(360deg); } }
.cam-bar { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; }
.cam-shutter { width: 68px; height: 68px; padding: 0; border-radius: 50%; border: 3px solid var(--ink, #141518); background: var(--surface, #fff); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-1, none); transition: transform .08s, opacity .15s; }
.cam-shutter span { width: 52px; height: 52px; border-radius: 50%; background: var(--gold, #C6A15B); display: block; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.cam-shutter:hover:not(:disabled) { transform: scale(1.04); }
.cam-shutter:active:not(:disabled) span { background: var(--gold-2, #B8913F); }
.cam-shutter:disabled { opacity: .4; cursor: not-allowed; }
.cam-shutter:focus-visible { outline: 3px solid var(--gold, #B8913F); outline-offset: 3px; }
.cam-shutter[hidden], .cam-retake[hidden] { display: none; }
.cam-retake { min-height: 44px; padding: 0 22px; }
.cam[data-cam-state="captured"] .cam-stage { border-color: var(--green, #1D6B4A); }

/* ---------- Start and End windows: numbered steps ---------- */
.le-win-intro { margin: 2px 0 0; color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.le-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: none; }
.le-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--line, #E6E4DE); border-radius: 16px; background: var(--surface-2, #F7F6F3); }
.le-step-n { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--dark, #141518); color: var(--on-dark, #fff); font-weight: 800; font-size: 13px; transition: background .15s; }
.le-step[data-done="1"] .le-step-n { background: var(--green, #1D6B4A); color: var(--surface, #fff); font-size: 15px; }
.le-step-b { min-width: 0; }
.le-step-t { font-weight: 800; font-size: 14.5px; color: var(--ink); margin: 4px 0 2px; display: block; }
.le-step-h { font-size: 13px; color: var(--muted, #5C5E66); margin: 0 0 10px; }
.le-box input.le-vid { width: 100%; box-sizing: border-box; min-height: 60px; padding: 8px 12px; border-radius: 14px; border: 1.5px solid var(--field-line, #D9D6CF); background: var(--surface, #fff); color: var(--ink); font-family: var(--sans, inherit); font-size: 30px; font-weight: 800; letter-spacing: .38em; text-indent: .38em; text-align: center; font-variant-numeric: tabular-nums; }
.le-box input.le-vid::placeholder { letter-spacing: .1em; text-indent: 0; font-size: 16px; font-weight: 500; color: var(--muted, #5C5E66); }
.le-box input.le-vid:focus { outline: none; border-color: var(--gold, #C6A15B); box-shadow: 0 0 0 3px rgba(198,161,91,.25); }

/* location: a coloured dot, one line of words, and a small round refresh button */
.le-locrow { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.le-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--amber, #9A4A07); box-shadow: 0 0 0 4px var(--amber-bg, #FDF1E3); }
.le-dot[data-s="ok"] { background: var(--green, #1D6B4A); box-shadow: 0 0 0 4px var(--green-bg, #E5F2EA); }
.le-dot[data-s="bad"] { background: var(--red, #A6281D); box-shadow: 0 0 0 4px var(--red-bg, #FBE7E5); }
.le-dot[data-s="finding"] { animation: le-pulse 1.1s ease-in-out infinite; }
@keyframes le-pulse { 50% { opacity: .45; } }
.le-locrow .le-loc, .le-locrow .le-loc.ok { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--ink, #141518); font-size: 14px; line-height: 1.4; }
.le-refresh { flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--field-line, #D9D6CF); background: var(--surface, #fff); color: var(--ink, #141518); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.le-refresh:hover { border-color: var(--gold, #C6A15B); background: var(--gold-soft, #F5EEDF); }
.le-refresh:focus-visible { outline: 2px solid var(--gold, #B8913F); outline-offset: 2px; }
.le-refresh.spin svg { animation: cam-spin .8s linear infinite; }
.le-step .le-dist { margin: 6px 0 0 21px; font-size: 13px; color: var(--ink); }

@media (min-width: 561px) { .le-box:has(#le-v-code) .cam-stage { max-height: 24vh; } }   /* Start has three steps: keep the round button on the screen of a laptop */
/* the buttons stay in view while the steps scroll */
.le-box:has(.le-steps) { --le-pad: var(--space-5, 24px); }
.le-box:has(.le-steps) .le-modal-foot { position: sticky; bottom: calc(-1 * var(--le-pad)); z-index: 2; background: var(--surface, #fff); margin: 14px 0 calc(-1 * var(--le-pad)); padding: 12px 0 var(--le-pad); border-top: 1px solid var(--line-2, #EFEDE8); }

@media (max-width: 560px) {
  .le-ov .le-box { padding: 16px; }
  .le-box:has(.le-steps) { --le-pad: 16px; }
  .le-step { padding: 12px; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
  .le-step-n { width: 26px; height: 26px; }
  .le-box input.le-vid { font-size: 28px; min-height: 64px; }
  .cam-stage { max-height: 38vh; }
  .le-modal-foot .btn { flex: 1 1 0; min-height: 46px; }
  .le-modal-foot .btn.le-go-big { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .le-dot[data-s="finding"], .cam-spin, .le-refresh.spin svg { animation: none; } }
