/* 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; }
}

/* ---- Customize: order + visibility (lp_cams cookie). Colours from the lp.css tokens, so light and dark both work. ---- */
/* In the section header, left of the collapse chevron: the button sits over a spacer at the end of the (full width)
   collapse button, so the chevron stays at the far right like every other section. */
.lpc-head { position: relative; --lpc-cw: 106px; }
.lpc-head > .lp-sec-h::after { content: ""; flex: none; width: var(--lpc-cw); margin-left: auto; }
.lpc-head > .lp-sec-h > .lp-chev { order: 1; margin-left: 0; }
.lpc-head > .lp-sec-h > .lp-sec-tt { flex: none; } /* "Webcams" never breaks; the summary gives way (ellipsis) */
.lpc-head > .lpc-cust { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); width: var(--lpc-cw); justify-content: center; }
.lp-sec[data-open="0"] > .lpc-head { --lpc-cw: 0px; }
.lp-sec[data-open="0"] .lpc-cust { display: none; }
.lpc-bar { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.lpc-cust {
  flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; margin: 0; box-sizing: border-box;
  border: 1px solid var(--lp-border-2, #c8c8c8); border-radius: 15px; background: var(--lp-surface, #fff);
  color: var(--lp-accent, #2d5886); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lpc-cust:hover { background: var(--lp-hover, #cce6ff); }
.lpc-cust:focus-visible { outline: 2px solid var(--lp-blue-2, #6699cc); outline-offset: 2px; }
.lpc-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lpc-cust .lpc-ic { width: 14px; height: 14px; }
@media (max-width: 359px) { .lpc-cust-t { display: none; } .lpc-cust { padding: 0 8px; } .lpc-head { --lpc-cw: 34px; } }
.lpc-row[hidden], .lpc-note[hidden] { display: none; }

.lpc-e {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); padding: 12px;
}
.lpc-e-panel {
  width: min(440px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  background: var(--lp-surface, #fff); color: var(--lp-text, #222); border: 1px solid var(--lp-border, #e3e3e3);
  border-radius: 10px; padding: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); outline: none; text-align: left;
}
.lpc-e-head { display: flex; align-items: center; gap: 8px; }
.lpc-e-title { flex: 1; margin: 0; font-size: 1.05rem; color: var(--lp-accent, #2d5886); }
.lpc-e-x {
  flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--lp-btn, #e6e6e6);
  color: var(--lp-btn-text, #333); font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.lpc-e-hint { margin: 0; font-size: 12.5px; color: var(--lp-muted, #5f6670); }
.lpc-e-list {
  list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1 1 auto;
  border-top: 1px solid var(--lp-border, #e3e3e3); overscroll-behavior: contain;
}
.lpc-e-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--lp-border, #e3e3e3); }
.lpc-e-lab { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.lpc-e-cb { position: absolute; left: 0; top: 50%; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.lpc-e-sw {
  flex: none; position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--lp-border-2, #c8c8c8);
  transition: background .15s ease;
}
.lpc-e-sw::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: transform .15s ease;
}
.lpc-e-cb:checked + .lpc-e-sw { background: var(--lp-blue-2, #6699cc); }
.lpc-e-cb:checked + .lpc-e-sw::after { transform: translateX(14px); }
.lpc-e-cb:focus-visible + .lpc-e-sw { outline: 2px solid var(--lp-blue-2, #6699cc); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .lpc-e-sw, .lpc-e-sw::after { transition: none; } }
.lpc-e-name { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lpc-e-off .lpc-e-name { color: var(--lp-muted, #5f6670); font-weight: 400; text-decoration: line-through; text-decoration-thickness: 1px; }
.lpc-e-pos { flex: none; min-width: 1.6em; text-align: right; font-size: 11px; color: var(--lp-muted, #5f6670); font-variant-numeric: tabular-nums; }
.lpc-e-mv {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--lp-border-2, #c8c8c8); border-radius: 8px; background: var(--lp-btn, #e6e6e6);
  color: var(--lp-btn-text, #333); cursor: pointer;
}
.lpc-e-mv:hover:not(:disabled) { background: var(--lp-btn-h, #d6d6d6); }
.lpc-e-mv:disabled { opacity: .35; cursor: default; }
.lpc-e-live { margin: 0; min-height: 1.2em; font-size: 12px; color: var(--lp-muted, #5f6670); }
.lpc-e-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lpc-e-btn {
  min-height: 38px; padding: 0 14px; border-radius: 19px; font: inherit; font-size: 14px; cursor: pointer;
  border: 1px solid var(--lp-border-2, #c8c8c8); background: var(--lp-btn, #e6e6e6); color: var(--lp-btn-text, #333);
}
.lpc-e-btn:disabled { opacity: .45; cursor: default; }
.lpc-e-done { background: var(--lp-blue, #2d5886); border-color: var(--lp-blue, #2d5886); color: #fff; font-weight: 600; }
.lpc-e button:focus-visible { outline: 2px solid var(--lp-blue-2, #6699cc); outline-offset: 2px; }
@media (max-width: 480px) {
  .lpc-e { padding: 0; align-items: flex-end; }
  .lpc-e-panel { border-radius: 12px 12px 0 0; max-height: 92%; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
}
