/* livefromset — design tokens */
:root {
  --bg-0: #07080a;
  --bg-1: #0d0e11;
  --bg-2: #14161a;
  --bg-3: #1c1f24;
  --bg-4: #262a31;
  --bg-5: #343943;

  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.16);

  --t-1: #f5f6f7;
  --t-2: #c9ccd2;
  --t-3: #8b8f97;
  --t-4: #5a5e66;

  --live: oklch(0.62 0.22 25);
  --live-glow: oklch(0.62 0.22 25 / 0.35);
  --live-dim: oklch(0.42 0.18 25);

  --ok: oklch(0.74 0.15 155);
  --warn: oklch(0.78 0.15 75);
  --info: oklch(0.72 0.10 230);

  --f-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 14px;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg-1);
  color: var(--t-2);
  font-family: var(--f-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }

.mono { font-family: var(--f-mono); font-feature-settings: "tnum"; letter-spacing: -0.01em; }
.kbd { font-family: var(--f-mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-3); color: var(--t-3); }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot.live { background: var(--live); box-shadow: 0 0 0 0 var(--live-glow); animation: pulse 1.6s ease-out infinite; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.off { background: var(--t-4); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--live-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.video-feed {
  position: relative;
  background:
    repeating-linear-gradient(
      45deg,
      #1a1d22 0 14px,
      #161a1f 14px 28px
    );
  overflow: hidden;
}
.video-feed::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(0,80,120,0.10), transparent 55%);
  pointer-events: none;
}
.video-feed::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.025), transparent);
  animation: scan 4.5s linear infinite;
  pointer-events: none;
}

.input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--t-1);
  font-family: var(--f-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.input:focus { border-color: var(--line-3); background: var(--bg-4); }
.input.mono { font-family: var(--f-mono); }

.btn {
  white-space: nowrap;
  height: 32px;
  padding: 0 14px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--t-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s, border-color 0.12s;
  font-weight: 500;
  text-decoration: none;
}
.btn:hover { background: var(--bg-4); border-color: var(--line-3); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary {
  background: var(--t-1);
  color: var(--bg-0);
  border-color: var(--t-1);
}
.btn.primary:hover { background: #fff; }
.btn.danger {
  background: var(--live);
  border-color: var(--live);
  color: #fff;
}
.btn.danger:hover { background: oklch(0.66 0.22 25); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-3); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-3);
  color: var(--t-2);
  border: 1px solid var(--line-1);
}
.chip.live { background: var(--live); color: #fff; border-color: var(--live); }
.chip.live .dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
.chip.rec { background: rgba(0,0,0,0.5); color: var(--live); border-color: var(--live-dim); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 5px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: var(--bg-5); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line-3);
  border-top-color: var(--t-1);
  animation: spin 0.8s linear infinite;
}

/* Wowza/Flowplayer container — let it fill its parent */
.wp-player-host {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.wp-player-host > div,
.wp-player-host .fp-player,
.wp-player-host video {
  width: 100% !important;
  height: 100% !important;
}
