/* Shared styles for the live feature pages: install guide, who-is-running,
   and the WO-Real timed capture. Builds on wo-shared.css (vars + .card etc.). */

.container { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { margin: 0; font-size: 26px; letter-spacing: 0.5px; }
h1 .q { color: var(--coral); }
.sub { opacity: 0.7; font-size: 13px; margin-top: 2px; }
.hint { opacity: 0.7; font-size: 13px; margin: 6px 0 14px; }

/* status chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
}
.chip.ok   { background: rgba(90, 200, 120, 0.16); border-color: rgba(90, 200, 120, 0.4); }
.chip.warn { background: rgba(230, 170, 60, 0.16); border-color: rgba(230, 170, 60, 0.4); }
.chip.off  { opacity: 0.6; }

/* platform tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600; font-size: 14px;
}
.tab.active { background: var(--coral); border-color: var(--coral); color: #1a1208; }

/* numbered steps */
ol.steps { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: step; }
ol.steps li {
  position: relative; padding: 10px 0 10px 42px; counter-increment: step;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 14.5px; line-height: 1.4;
}
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 9px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--coral); color: #1a1208; font-weight: 700; font-size: 14px;
}

/* big action buttons reuse .wo-btn-primary; add a block variant */
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .wo-btn-primary, .btn-row .wo-btn-ghost { flex: 1; }

/* ---------- who is running ---------- */
.progress-wrap { margin: 10px 0 6px; }
.progress-bar {
  height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1);
  overflow: hidden; position: relative;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  width: 0%; transition: width 0.6s ease;
}
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; opacity: 0.75; margin-top: 4px; }
.km-big { font-size: 34px; font-weight: 800; }
.km-big small { font-size: 15px; font-weight: 600; opacity: 0.6; }

.runner-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.runner-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.06); }
.runner-dot.live { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(90,200,120,0.5);} 50%{ box-shadow:0 0 0 7px rgba(90,200,120,0);} }
.runner-name { font-weight: 600; flex: 1; }
.runner-state { font-size: 12.5px; opacity: 0.7; }
.runner-state.running { color: #6ed08a; opacity: 1; font-weight: 600; }

/* big self toggle for runners */
.self-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.switch { position: relative; width: 58px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.18); transition: 0.2s;
}
.switch .slider::before {
  content: ''; position: absolute; height: 24px; width: 24px; left: 4px; top: 4px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: #4caf6e; }
.switch input:checked + .slider::before { transform: translateX(26px); }

/* ---------- WO-Real ---------- */
.wo-real-hero { text-align: center; padding: 8px 0 4px; }
.countdown-big { font-size: 54px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.countdown-big.live { color: var(--coral); }
.capture-stage { position: relative; width: 100%; aspect-ratio: 3/4; background: #000; border-radius: 16px; overflow: hidden; margin-top: 10px; }
.capture-stage video, .capture-stage canvas, .capture-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cap-inset {
  position: absolute; top: 10px; left: 10px; width: 33%; aspect-ratio: 3/4;
  border-radius: 12px; border: 2px solid #fff; object-fit: cover; box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  z-index: 2; background:#111;
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5; }
.flash.fire { animation: flashfire 0.4s ease; }
@keyframes flashfire { 0% { opacity: 0.9; } 100% { opacity: 0; } }

/* ---------- admin: push subscribers ---------- */
.subs-count { font-size: 14px; font-weight: 600; opacity: 0.6; }
.subs-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); flex-wrap: wrap;
}
.subs-row:last-child { border-bottom: 0; }
.subs-name { font-weight: 600; }
.subs-n { opacity: 0.55; font-weight: 600; }
.subs-plats { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- WO-Real photo wall ---------- */
.wo-real-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 420px) { .wo-real-grid { grid-template-columns: repeat(2, 1fr); } }
.wo-tile {
  margin: 0; position: relative; border-radius: 12px; overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 5; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.12s ease;
}
.wo-tile:hover { transform: scale(1.02); }
.wo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.wo-by {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 6px; padding: 16px 8px 6px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.wo-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; border: 1.5px solid rgba(255, 255, 255, 0.7); }
.wo-av-ph { display: grid; place-items: center; background: var(--coral); color: #1a1208; font-size: 10px; font-weight: 800; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.92);
  display: grid; place-items: center; padding: 24px;
}
.lightbox-fig { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox-fig img { max-width: 100%; max-height: 82vh; border-radius: 12px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6); }
.lightbox-fig figcaption { color: #f5e2c7; margin-top: 12px; font-weight: 600; font-size: 15px; }
.lightbox-close {
  position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); border: 0; color: #fff; font-size: 20px; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }

/* ---------- race-mode live banner ---------- */
.live-banner {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 14px; margin-bottom: 14px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(217, 106, 58, 0.22), rgba(230, 170, 60, 0.18));
  border: 1px solid rgba(217, 106, 58, 0.45);
  font-weight: 700; font-size: 14px; letter-spacing: 0.3px; color: #f7e6cf;
}
.live-pip { width: 10px; height: 10px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.6); animation: pulse 1.4s infinite; }

/* ---------- admin test panel ---------- */
.admin-runner {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07); cursor: pointer; font-weight: 600;
}
.admin-runner:last-of-type { border-bottom: 0; }
.admin-runner input { width: 18px; height: 18px; accent-color: #4caf6e; }
.admin-runner span:nth-of-type(1) { flex: 1; }
.admin-runner-role { font-size: 11px; font-weight: 600; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.4px; }
.sim-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sim-label { display: block; font-size: 13px; margin-bottom: 8px; }
.sim-range { width: 100%; accent-color: var(--coral); margin-bottom: 10px; }
