/* lp-cams.css: webcam strips + viewer (js/lp-cams.js). Loaded by the module itself if the page did not link it. */
.lpc { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lpc-group { min-width: 0; }
.lpc-title { margin: 4px 0 6px; font-size: 15px; font-weight: 700; color: #2d5886; text-align: left; }
.lpc-row {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.lpc-thumb {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 3px; padding: 0; margin: 0;
  border: 0; background: none; cursor: pointer; font: inherit; color: inherit; scroll-snap-align: start; text-align: left;
}
.lpc-thumb:disabled { cursor: default; }
.lpc-thumb:focus-visible { outline: 2px solid #2d5886; outline-offset: 2px; border-radius: 6px; }
.lpc-frame {
  position: relative; display: block; overflow: hidden; border-radius: 6px; background: #dfe6ee;
  box-shadow: 0 0 3px rgba(45, 88, 134, .45); contain: strict;
}
.lpc-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lpc-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%; animation: lpc-sweep 1.2s linear infinite;
}
@keyframes lpc-sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .lpc-loading::after { animation: none; } }
.lpc-quiet { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #567; }
.lpc-name { font-size: 12px; line-height: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #2d5886; }
.lpc-badge {
  position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 8px);
  padding: 1px 6px; border-radius: 9px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; line-height: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lpc-badge[hidden] { display: none; }
.lpc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.lpc-dot[hidden] { display: none; }
.lpc-dot-live { background: #3ddc6b; box-shadow: 0 0 0 2px rgba(61,220,107,.25); }
.lpc-dot-stale { background: #f0b429; }
.lpc-note { margin: 4px 0; font-size: 13px; color: #666; }

/* ---- viewer ---- */
.lpc-v {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72); padding: 8px;
}
.lpc-v-panel {
  width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 6px; overflow: auto;
  background: #111; color: #fff; border-radius: 10px; padding: 8px 8px 6px; box-shadow: 0 6px 30px rgba(0,0,0,.5); outline: none;
  text-align: left;
}
.lpc-v-top { display: flex; align-items: center; gap: 6px; }
.lpc-v-name { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.lpc-v-cam, .lpc-v-close, .lpc-v-step, .lpc-v-now {
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; border-radius: 16px;
  font: inherit; cursor: pointer; min-height: 34px; min-width: 34px; padding: 0 10px;
}
.lpc-v-close { font-size: 22px; line-height: 1; padding: 0 8px; }
.lpc-v-cam { font-size: 20px; line-height: 1; }
.lpc-v button:disabled { opacity: .35; cursor: default; }
.lpc-v button:focus-visible { outline: 2px solid #9fbddf; outline-offset: 1px; }
.lpc-v-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); min-height: 160px;
  background: #000; border-radius: 6px; overflow: hidden; touch-action: pan-y;
}
.lpc-v-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lpc-v-zone { position: absolute; top: 0; bottom: 0; width: 35%; border: 0; background: transparent; cursor: pointer; padding: 0; }
.lpc-v-zone[hidden] { display: none; }
.lpc-v-back { left: 0; cursor: w-resize; }
.lpc-v-fwd { right: 0; cursor: e-resize; }
.lpc-v-spin { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, #9fbddf, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: lpc-line 1s linear infinite; }
.lpc-v-spin[hidden] { display: none; }
@keyframes lpc-line { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.lpc-v-caption { display: flex; flex-direction: column; gap: 2px; min-height: 36px; }
.lpc-v-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.lpc-v-label { flex: 1 1 auto; min-width: 0; }
.lpc-tone-live { color: #6ee787; font-weight: 700; }
.lpc-tone-stale { color: #f0b429; }
.lpc-v-now { min-height: 28px; font-size: 12px; }
.lpc-v-now[hidden] { display: none; }
.lpc-v-credit { color: rgba(255,255,255,.6); font-size: 11px; text-decoration: none; font-weight: 400; }
.lpc-v-credit[hidden] { display: none; }
.lpc-v-scrub { display: flex; align-items: center; gap: 8px; }
.lpc-v-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.lpc-v-range { width: 100%; accent-color: #6699cc; margin: 4px 0 0; }
.lpc-v-steplabel { text-align: center; font-size: 12px; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.lpc-v-step { white-space: nowrap; font-size: 13px; }
.lpc-v-hint { font-size: 12px; color: rgba(255,255,255,.6); text-align: center; }
.lpc-v-hint[hidden] { display: none; }
.lpc-v-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.lpc-v-sitem { flex: 0 0 auto; width: 72px; border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.lpc-v-sframe { display: block; width: 72px; height: 48px; border-radius: 4px; overflow: hidden; background: #333; border: 2px solid transparent; box-sizing: border-box; }
.lpc-v-sframe img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lpc-v-sname { display: block; font-size: 11px; margin-top: 3px; color: rgba(255,255,255,.6); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpc-on .lpc-v-sframe { border-color: #fff; }
.lpc-on .lpc-v-sname { color: #fff; }
@media (max-width: 480px) {
  .lpc-v { padding: 0; }
  .lpc-v-panel { border-radius: 0; height: 100%; }
  .lpc-v-stage { max-height: calc(100vh - 250px); }
  .lpc-v-step { padding: 0 8px; font-size: 12px; }
}
