/* CXI Live & Videos — shared styles for the Staff and Field apps (identical file in both repos). */
/* Uses the host app's own design tokens (CXI Field: --ink, --accent navy #2b2d62, --card, --line…; dark theme via the
   app's data-theme), so Live & Videos looks like the rest of CXI. Fallbacks are the CXI light palette. */
.lb-root { --lb-ink: var(--ink, #20234f); --lb-muted: var(--muted, #60637e); --lb-line: var(--line, #d9d9e6); --lb-bg: var(--card, #fff);
  --lb-soft: var(--accent-soft, #e8e6f0); --lb-accent: var(--accent, #2b2d62); --lb-navy: var(--accent-dark, #20234f); --lb-live: #c62828; --lb-ok: var(--ok, #0a7c4a);
  --lb-btn: var(--lb-accent); --lb-warn-bg: #fff6e0; --lb-warn-ink: #6b4a00; --lb-bad-ink: #b42318; --lb-bad-bg: #fde8e7; --lb-skel: rgba(32,35,79,.08); --lb-shadow: 0 1px 2px rgba(16,18,40,.06), 0 6px 18px -12px rgba(16,18,40,.35);
  max-width: 980px; margin: 0 auto; padding: 12px 16px 40px; color: var(--lb-ink); font: inherit; line-height: 1.45; box-sizing: border-box; }
.lb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lb-head .lb-link { flex: none; white-space: nowrap; }
.lb-head h1 { font-size: 1.3rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-section { margin: 18px 0; } .lb-section h2 { font-size: 1.05rem; margin: 0 0 8px; }
/* Feed: large portrait tiles (2 across on a phone), poster frame on top, presenter underneath. */
.lb-list, .lb-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.lb-card { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: left; padding: 0 0 10px; border: 1px solid var(--lb-line); border-radius: 16px; background: var(--lb-bg); color: inherit; font: inherit; cursor: pointer; min-height: 48px; overflow: hidden; box-shadow: var(--lb-shadow); transition: transform .15s ease, border-color .15s ease; }
.lb-card:hover { transform: translateY(-2px); } .lb-card:hover, .lb-card:focus-visible { border-color: var(--lb-accent); outline: none; }
.lb-card:focus-visible { box-shadow: 0 0 0 3px var(--lb-soft), var(--lb-shadow); }
.lb-card.lb-unseen { border-color: var(--lb-accent); border-width: 2px; }
.lb-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 10px; } .lb-title { overflow-wrap: anywhere; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lb-card-body small, .lb-who small { color: var(--lb-muted); }
.lb-kind { position: relative; flex: none; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; background: var(--lb-navy); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; line-height: 1; }
.lb-kind img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; } .lb-kind img[hidden] { display: none; }
.lb-ph { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: #fff;
  background: radial-gradient(120% 80% at 30% 20%, rgba(255,255,255,.18), transparent 60%), linear-gradient(160deg, #3b3f8f, #20234f 65%, #15173a); }
.lb-ph .lb-brand-mark { font-size: .9rem; } .lb-ph-icon { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.lb-badge { position: absolute; top: 8px; left: 8px; } .lb-pill.lb-fresh { background: var(--lb-btn); color: #fff; font-weight: 700; }
.lb-dur { position: absolute; right: 8px; bottom: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: .78rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.lb-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.3); } .lb-prog i { display: block; height: 100%; background: var(--lb-live); }
.lb-by { display: flex; gap: 8px; align-items: center; min-width: 0; } .lb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; } .lb-who > * { overflow: hidden; text-overflow: ellipsis; }
.lb-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--lb-soft); color: var(--lb-ink); font-weight: 700; font-size: .78rem; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.lb-avatar-lg { width: 48px; height: 48px; font-size: 1rem; background: rgba(255,255,255,.18); color: #fff; }
.lb-dot { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--lb-accent); }
/* Live now strip */
.lb-livenow h2 { display: flex; align-items: center; gap: 8px; }
.lb-dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--lb-live); animation: lb-pulse 1.6s ease-out infinite; }
.lb-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(86%, 320px), 1fr); gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.lb-livecard { scroll-snap-align: start; display: flex; gap: 12px; align-items: center; min-height: 88px; padding: 14px; border: 0; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: #fff;
  background: linear-gradient(135deg, #c62828, #8e1b1b); box-shadow: 0 8px 22px -12px rgba(198,40,40,.8); }
.lb-livecard .lb-who { flex: 1; gap: 4px; min-width: 0; } .lb-livecard .lb-who strong, .lb-livecard .lb-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lb-livecard .lb-who small { color: rgba(255,255,255,.88); } .lb-livecard .lb-pill.lb-live { background: rgba(255,255,255,.2); align-self: flex-start; }
.lb-livecard:focus-visible { outline: 3px solid var(--lb-ink); outline-offset: 2px; }
.lb-watch { flex: none; background: #fff; color: #8e1b1b; font-weight: 700; border-radius: 999px; padding: 10px 14px; min-height: 48px; display: inline-flex; align-items: center; }
.lb-pulse { animation: lb-pulse 1.6s ease-out infinite; }
@keyframes lb-pulse { 0% { box-shadow: 0 0 0 0 rgba(198,40,40,.6); } 70% { box-shadow: 0 0 0 10px rgba(198,40,40,0); } 100% { box-shadow: 0 0 0 0 rgba(198,40,40,0); } }
.lb-quiet { color: var(--lb-muted); background: var(--lb-soft); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.lb-upcoming { display: grid; gap: 8px; }
.lb-uprow { display: flex; gap: 12px; align-items: center; text-align: left; min-height: 56px; padding: 10px 14px; border: 1px solid var(--lb-line); border-radius: 14px; background: var(--lb-bg); color: inherit; font: inherit; cursor: pointer; }
.lb-uprow:hover, .lb-uprow:focus-visible { border-color: var(--lb-accent); outline: none; }
.lb-cal { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--lb-soft); color: var(--lb-accent); display: flex; align-items: center; justify-content: center; }
.lb-ico { vertical-align: -5px; } .lb-link .lb-ico { margin-right: 4px; }
.lb-emptystate { text-align: center; padding: 28px 16px; border: 1px dashed var(--lb-line); border-radius: 16px; color: var(--lb-muted); }
.lb-emptystate strong { display: block; color: var(--lb-ink); font-size: 1.05rem; margin: 6px 0 4px; } .lb-emptystate p { margin: 0; } .lb-empty-icon { font-size: 2rem; }
/* Loading skeletons (no spinner-only screens) */
.lb-skel { background: var(--lb-skel); border-radius: 14px; position: relative; overflow: hidden; }
.lb-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: lb-shimmer 1.3s infinite; }
.lb-skel-strip { height: 88px; margin: 12px 0 18px; } .lb-skel-tile { aspect-ratio: 9 / 19; } .lb-skel-row { height: 40px; margin: 8px 0; }
@keyframes lb-shimmer { to { transform: translateX(100%); } }
.lb-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lb-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--lb-soft); color: var(--lb-ink); font-size: .8rem; white-space: nowrap; }
.lb-pill.lb-live, .lb-live { background: var(--lb-live); color: #fff; font-weight: 700; } .lb-muted { color: var(--lb-muted); } .lb-pill.lb-muted { color: var(--lb-muted); }
.lb-bad, .lb-pill.lb-bad { color: var(--lb-bad-ink); } .lb-pill.lb-bad { background: var(--lb-bad-bg); }
.lb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; align-items: center; }
.lb-primary, .lb-secondary, .lb-danger, .lb-thumb { min-height: 48px; padding: 10px 18px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.lb-primary { background: var(--lb-btn); color: #fff; } .lb-secondary { background: var(--lb-soft); color: var(--lb-ink); border-color: var(--lb-line); }
.lb-primary:focus-visible, .lb-secondary:focus-visible, .lb-danger:focus-visible, .lb-thumb:focus-visible, .lb-link:focus-visible, .lb-tab:focus-visible, .lb-uprow:focus-visible { outline: 3px solid var(--lb-accent); outline-offset: 2px; }
.lb-danger { background: var(--lb-bad-ink); color: #fff; } .lb-link { background: none; border: 0; color: var(--lb-accent); font: inherit; font-weight: 600; cursor: pointer; padding: 8px 4px; min-height: 48px; }
.lb-primary:disabled, .lb-secondary:disabled { opacity: .55; cursor: default; }
.lb-golive { background: var(--lb-live); font-size: 1.05rem; padding: 12px 28px; }
.lb-golive:disabled { background: var(--lb-soft); color: var(--lb-muted); border-color: var(--lb-line); opacity: 1; }
.lb-panel { background: var(--lb-bg); border: 1px solid var(--lb-line); border-radius: 14px; padding: 14px; margin: 12px 0; }
.lb-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-thumb { background: var(--lb-soft); border-color: var(--lb-line); color: var(--lb-ink); } .lb-thumb.on { background: var(--lb-btn); color: #fff; }
.lb-thumb.lb-pop { animation: lb-pop .45s cubic-bezier(.2, 1.6, .4, 1); } @keyframes lb-pop { 0% { transform: scale(1); } 40% { transform: scale(1.22) rotate(-8deg); } 100% { transform: scale(1); } }
.lb-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
/* Portrait 9:16 frame (every broadcast and video is portrait): as tall as the screen allows below the app chrome,
   width derived from the aspect ratio, centred on black; the CXI controls sit inside the frame. */
.lb-root, .lb-studio { --lb-frame-h: max(320px, calc(100vh - var(--lb-chrome, 190px))); }
@supports (height: 100dvh) { .lb-root, .lb-studio { --lb-frame-h: max(320px, calc(100dvh - var(--lb-chrome, 190px))); } }
.lb-studio { --lb-chrome: 300px; } /* go-live / record screens keep their Go live / Record buttons on screen */
.lb-player, .lb-studio { width: min(100%, calc(var(--lb-frame-h) * 9 / 16)); margin-left: auto; margin-right: auto; }
.lb-studio .lb-stage, .lb-studio .lb-player { width: 100%; }
.lb-player, .lb-stage { position: relative; aspect-ratio: 9 / 16; background: #000; border-radius: 14px; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.lb-player video, .lb-player canvas, .lb-stage video, .lb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.lb-player > [hidden], .lb-stage > [hidden] { display: none !important; }
.lb-mirror { transform: scaleX(-1); }
.lb-overlay { position: absolute; inset: auto 12px 12px 12px; background: rgba(0,0,0,.72); color: #fff; padding: 10px 14px; border-radius: 10px; text-align: center; cursor: pointer; }
.lb-studio { position: relative; } .lb-hud { position: absolute; z-index: 4; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.lb-hud .lb-pill { background: rgba(0,0,0,.72); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.5); box-shadow: 0 0 0 1px rgba(255,255,255,.25); } .lb-hud .lb-pill.lb-live { background: var(--lb-live); }
.lb-controls select { min-height: 48px; border-radius: 12px; padding: 0 10px; border: 1px solid var(--lb-line); background: var(--lb-bg); color: inherit; font: inherit; }
.lb-warn { background: var(--lb-warn-bg); color: var(--lb-warn-ink); border-radius: 10px; padding: 8px 12px; } .lb-section.lb-warn h2 { color: var(--lb-warn-ink); }
.lb-flash { min-height: 1.2em; margin: 8px 0; } .lb-flash:empty { min-height: 0; margin: 0; } .lb-flash.lb-bad { color: var(--lb-bad-ink); font-weight: 600; }
.lb-form label { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-weight: 600; }
.lb-form input[type=text], .lb-form input:not([type]), .lb-form input[type=search], .lb-form input[type=datetime-local], .lb-form textarea, .lb-form select {
  font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--lb-line); background: var(--lb-bg); color: inherit; min-height: 48px; width: 100%; }
.lb-form fieldset { border: 1px solid var(--lb-line); border-radius: 12px; margin: 12px 0; padding: 10px 12px; display: grid; gap: 8px; }
.lb-form legend { font-weight: 700; padding: 0 6px; } .lb-inline { flex-direction: row !important; align-items: center; font-weight: 500 !important; }
.lb-settings .lb-inline { display: flex; gap: 12px; align-items: center; min-height: 48px; cursor: pointer; } .lb-settings input[type=checkbox] { width: 22px; height: 22px; margin: 0; flex: none; }
.lb-checks { max-height: 220px; overflow: auto; display: grid; gap: 2px; } .lb-checks label { flex-direction: row; font-weight: 400; margin: 0; gap: 8px; align-items: center; }
.lb-results { display: grid; gap: 4px; } .lb-result { text-align: left; padding: 8px 10px; border: 1px solid var(--lb-line); border-radius: 10px; background: var(--lb-bg); color: inherit; font: inherit; cursor: pointer; }
.lb-result small { color: var(--lb-muted); } .lb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-chip { background: var(--lb-soft); border-radius: 999px; padding: 4px 6px 4px 12px; display: inline-flex; gap: 4px; align-items: center; }
.lb-chip button { border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: inherit; min-width: 48px; min-height: 48px; }
.lb-file { display: flex; align-items: center; justify-content: center; margin-top: 12px; cursor: pointer; position: relative; }
.lb-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.lb-root progress { width: 100%; height: 14px; }
.lb-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--lb-line); border-radius: 12px; }
.lb-table { border-collapse: collapse; width: 100%; font-size: .9rem; } .lb-table th, .lb-table td { padding: 8px 10px; border-bottom: 1px solid var(--lb-line); text-align: left; white-space: nowrap; }
.lb-table tbody tr[data-lb-report] { cursor: pointer; } .lb-table tbody tr:hover { background: var(--lb-soft); }
.lb-kpis { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; } .lb-kpis strong { font-size: 1.2rem; display: block; }
.lb-empty, .lb-loading { color: var(--lb-muted); }
.lb-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--lb-live, #c62828); color: #fff; font-weight: 600; cursor: pointer; border: 0; width: 100%; text-align: left; font: inherit; min-height: 48px; }
/* Desktop (Staff back office): smaller portrait tiles so titles stay above the fold. */
@media (min-width: 900px) { .lb-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 200px)); } }
@media (max-width: 600px) { .lb-root { padding: 8px 12px 32px; } .lb-list, .lb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .lb-actions > button { flex: 1 1 auto; } }

/* CXI player chrome (our own controls; no browser or third-party player UI). */
.lb-player { flex-direction: column; }
.lb-player video::-webkit-media-controls { display: none !important; }
.lb-brand { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; align-items: center; color: #fff; font-weight: 700; font-size: .85rem; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.lb-brand-mark { background: var(--lb-navy); border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 1px 6px; letter-spacing: .04em; }
.lb-ctrls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: linear-gradient(transparent, rgba(16,18,40,.85)); color: #fff; }
.lb-ctrls[hidden] { display: none; }
.lb-ctrl { min-width: 48px; min-height: 48px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 1.05rem; cursor: pointer; }
.lb-ctrl:focus-visible { outline: 2px solid #fff; }
.lb-seek { flex: 1; min-width: 60px; accent-color: #fff; }
.lb-time { font-variant-numeric: tabular-nums; font-size: .85rem; }
.lb-grow { flex: 1; }
.lb-player:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; }
.lb-player:fullscreen video, .lb-player:fullscreen canvas { object-fit: contain; }
/* Tabs: "My broadcasts" is rendered only for server-authorised posters. */
.lb-tabs { display: flex; gap: 6px; margin: 4px 0 12px; border-bottom: 1px solid var(--lb-line); }
.lb-tab { min-height: 48px; padding: 8px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--lb-muted); font: inherit; font-weight: 700; cursor: pointer; }
.lb-tab.on { color: var(--lb-accent); border-bottom-color: var(--lb-accent); }
.lb-create { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 8px; }
.lb-create button { width: 100%; }
.lb-big { border: 0; cursor: pointer; font: inherit; display: flex; gap: 14px; align-items: center; text-align: left; min-height: 88px; padding: 16px 18px; border-radius: 18px; font-size: 1rem; color: #fff; box-shadow: var(--lb-shadow); }
.lb-big strong { display: block; font-size: 1.15rem; } .lb-big small { display: block; opacity: .9; font-weight: 500; }
.lb-big-icon { font-size: 1.8rem; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex: none; }
.lb-minor { margin-top: 0; gap: 0 18px; justify-content: center; } .lb-root .lb-minor > button { flex: 0 1 auto; }
/* Go-live studio: countdown, LIVE timer + viewers, clear End. */
.lb-count { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: rgba(10,10,25,.62); color: #fff; font-weight: 700; border-radius: 14px; }
.lb-count-n { font-size: 6rem; line-height: 1; font-variant-numeric: tabular-nums; } .lb-tick { animation: lb-tick .9s ease-out; }
@keyframes lb-tick { 0% { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1); } }
.lb-hud .lb-pill { font-size: .95rem; padding: 4px 11px; font-weight: 700; }
.lb-golive-row { justify-content: center; } .lb-golive-row > button { flex: 1 1 200px; }
/* Upload progress steps */
.lb-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; margin: 10px 0 14px; counter-reset: lb-step; }
.lb-steps li { counter-increment: lb-step; text-align: center; font-size: .85rem; color: var(--lb-muted); padding-top: 34px; position: relative; }
.lb-steps li::before { content: counter(lb-step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lb-soft); color: var(--lb-ink); font-weight: 700; }
.lb-steps li.on { color: var(--lb-ink); font-weight: 700; } .lb-steps li.on::before { background: var(--lb-btn); color: #fff; }
.lb-steps li.done::before { content: "✓"; background: var(--lb-ok); color: #fff; }
/* Dark theme (the host's data-theme): the host tokens flip the surfaces; fixed colours are mapped here. */
:root[data-theme="dark"] .lb-root { --lb-btn: #474bb0; --lb-warn-bg: #3a2f12; --lb-warn-ink: #ffd88a; --lb-bad-ink: #ff9b93; --lb-bad-bg: #4a1f1d; --lb-skel: rgba(255,255,255,.08);
  --lb-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px -14px rgba(0,0,0,.8); }
:root[data-theme="dark"] .lb-danger { background: #b42318; }
:root[data-theme="dark"] .lb-skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
@media (prefers-reduced-motion: reduce) { .lb-root *, .lb-root *::before, .lb-root *::after { animation: none !important; transition: none !important; } .lb-card:hover { transform: none; } }
.msg-live { margin-top: 8px; }
.lb-stage.lb-player + .lb-hud { top: 46px; }
.lb-hud .lb-pill:empty { display: none; }
