/* Live satsang (js/live.js): viewer #/live/<id> and sevadar broadcast #/golive/<id>.
   Colours come from the tokens in app.css, so dark mode follows them. */

/* .btn, .pill and .check-row set their own display, which would beat the hidden attribute */
.lv [hidden] { display: none !important; }
/* the dark theme's --warn is a light red: keep white text readable on End / Mute / Stop */
.lv .btn.danger { background: #B3261E; color: #fff; }
/* elders' rule: every tap target on the live screens is at least 44px high (app.css makes .btn.small 38px) */
.lv .btn.small { min-height: 44px; }
.lv .check-row { min-height: 44px; align-items: center; }

.lv-head h1 { margin-bottom: 2px; }
.lv-head .pill.live { flex: none; }
.lv-item h2 { margin: 0; }
.lv-big { min-height: 56px; font-size: 1.06em; margin-top: 12px; }
.lv-me { margin: 10px 0 4px; padding: 10px 12px; background: var(--card); border-radius: 12px; border: 1px solid var(--line); }
.lv-step { display: flex; align-items: center; gap: 18px; }
.lv-step .iconbtn { width: 52px; height: 52px; font-size: 1.5em; font-weight: 700; }
.lv-step b { font-size: 1.5em; min-width: 2ch; text-align: center; }
.lv-line { font-size: 1.05em; color: var(--maroon); font-weight: 650; }

/* waiting room */
.lv-ring { width: 96px; height: 96px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: #FFE2B8; color: #8A2A12; font-weight: 800; font-size: 1.5em;
  box-shadow: inset 0 0 0 3px #E0A040; position: relative; }
.lv-ring::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--saffron); opacity: .5; animation: lvBreath 3.2s ease-in-out infinite; }
@keyframes lvBreath { 0%, 100% { transform: scale(.94); opacity: .25; } 50% { transform: scale(1.06); opacity: .7; } }

/* video stage (viewer and sevadar preview) */
.lv-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; margin: 6px 0 8px; }
.lv-stage video, .lv-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.lv-stage video.lv-mirror { transform: scaleX(-1); }
.lv-over { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; color: #fff; background: rgba(0, 0, 0, .5); padding: 16px; font-weight: 650; pointer-events: none; }
.lv-over[hidden], .lv-seal[hidden], .lv-away[hidden], .lv-tap[hidden], .lv-badge[hidden] { display: none; }
.lv-over .spin { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
.lv-seal { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(135deg, #7A2410, #B4481C); color: #FFF4E6; font-weight: 650; text-align: center; padding: 10px; }
.lv-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; border: 0; border-radius: 999px; padding: 14px 26px; min-height: 58px;
  font-size: 1.12em; font-weight: 750; background: var(--saffron); color: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .45); cursor: pointer; white-space: nowrap; animation: pulse 1.6s infinite; }
.lv-away { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: rgba(0, 0, 0, .7); color: #fff; font-size: .85em; padding: 6px 10px; text-align: center; }
.lv-badge { position: absolute; left: 10px; top: 10px; z-index: 3; background: #D92D20; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .78em; font-weight: 750; }
.lv-fsx { display: none; }
.lv-stage.lv-fs { position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.lv-stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.lv-stage.lv-fs .lv-fsx, .lv-stage:fullscreen .lv-fsx { display: block; position: absolute; right: 10px; top: max(10px, env(safe-area-inset-top)); z-index: 5;
  border: 0; border-radius: 999px; padding: 10px 16px; min-height: 48px; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 700; cursor: pointer; }
body.lv-noscroll { overflow: hidden; }
.lv-ctl { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
.lv-ctl .check-row { margin: 4px 0; flex: 1 1 200px; }
.lv-ctl2 { margin-top: 2px; }
.lv-ctl2 .btn.danger { color: #fff; }

/* taking part */
.lv-now { border-left: 5px solid var(--saffron); }
.lv-prog { font-size: 1.22em; font-weight: 750; color: var(--maroon); line-height: 1.3; }
.lv-item .lv-prog { font-size: .95em; }
.lv-hint { margin-top: 4px; }
.lv-hint:empty { display: none; }
.lv-jaap { display: flex; gap: 14px; align-items: center; }
.lv-jbtn { width: 96px; height: 96px; border-radius: 50%; border: 0; flex: none; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 35% 30%, #FFE9C7, #F2B36B); color: #8A2A12; font-weight: 800; font-size: 1.5em;
  box-shadow: inset 0 0 0 3px #E0A040, 0 3px 10px rgba(120, 50, 10, .25); }
.lv-jbtn:active { transform: scale(.93); }
.lv-jn { font-size: 1.1em; font-weight: 750; color: var(--maroon); }
.lv-jcard.lv-hot { border-color: var(--saffron); box-shadow: 0 0 0 3px var(--soft); }
.lv-segs { list-style: none; padding: 0; margin: 0; counter-reset: lvseg; }
.lv-segs li { display: flex; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); color: var(--muted); }
.lv-segs li:last-child { border-bottom: 0; }
.lv-segs li::before { counter-increment: lvseg; content: counter(lvseg); width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--ink);
  display: grid; place-items: center; font-size: .8em; font-weight: 700; flex: none; }
.lv-segs li.on { color: var(--ink); font-weight: 750; }
.lv-segs li.on::before { background: var(--saffron); color: #fff; }
.lv-bless { text-align: left; margin-top: 14px; }
.lv-done h2 { margin-top: 4px; }

/* sevadar: start form */
.lv-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 0; background: var(--card); cursor: pointer; }
.lv-opt input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--saffron); flex: none; }
.lv-opt:has(input:checked) { border-color: var(--saffron); background: var(--soft2); }
.lv-opt.off { opacity: .5; cursor: default; }
.lv-optd { display: block; margin-top: 2px; }
.lv-perm { background: var(--amberbg); border-radius: 12px; padding: 4px 12px 10px; margin-top: 14px; }
.lv-perm .check-row { margin-bottom: 2px; }

/* sevadar: running broadcast */
.lv-state { font-weight: 650; color: var(--muted); }
.lv-state.on { color: var(--good); }
.lv-progrow { margin-top: 10px; gap: 8px; }
.lv-progrow input { flex: 1; min-width: 0; }
.lv-shown { color: var(--maroon); font-weight: 650; }
#glSegs .chip { min-height: 44px; }
.lv-tot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.lv-h2 { margin-top: 16px; }
.lv-list > li { flex-wrap: wrap; align-items: flex-start; }
.lv-list .t .pill { margin-left: 4px; vertical-align: middle; }
.lv-list a[data-tel] { text-decoration: none; white-space: nowrap; }
.lv-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.lv-acts .btn.small { min-height: 44px; }
.lv-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; margin-top: 8px; }
.lv-dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--goodbg); }
.lv-others { margin-top: 12px; }
.lv-others summary { cursor: pointer; font-weight: 650; padding: 8px 0; min-height: 44px; }
.lv-sum { margin: 12px 0 4px; text-align: left; }
#glRecCard .btn.danger { color: #fff; }

/* floating "back to the broadcast" button while the sevadar looks at another screen */
.lv-pill { position: fixed; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 12; border: 0; border-radius: 999px; padding: 10px 16px; min-height: 48px;
  background: #D92D20; color: #fff; font-weight: 750; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); cursor: pointer; max-width: calc(100vw - 24px); }
.lv-pill[hidden] { display: none; }

@media (max-width: 380px) {
  .lv-jbtn { width: 84px; height: 84px; }
  .lv-acts { width: 100%; justify-content: flex-start; margin-left: 0; }
  .lv-tap { padding: 12px 18px; font-size: 1em; }
}
