/* Živé vysílání (LiveController): přehled /zive, detail s chatem, vysílací stránka, odznaky a indikátor v hlavičce. */

/* ── Červená tečka „živě“ ── */
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation: live-pulse 1.6s infinite; vertical-align: middle; flex-shrink: 0; }
.live-dot.is-big { width: 14px; height: 14px; margin-right: 4px; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── Indikátor v tmavé hlavičce ── */
.live-ind { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(239, 68, 68, .45); color: #fecaca; font-size: 13px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.live-ind:hover { background: rgba(239, 68, 68, .14); color: #fff; }
.live-ind b { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; line-height: 17px; }
@media (max-width: 640px) { .live-ind-t { display: none; } .live-ind { padding: 8px; border: 0; } }

/* ── Odznak na stránce a u akce ── */
.live-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; text-decoration: none; }
.live-pill-t { font-weight: 500; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.live-pill-t::before { content: '·'; margin-right: 8px; }
.live-pill.is-live { background: #ef4444; color: #fff; box-shadow: 0 4px 14px rgba(239, 68, 68, .35); }
.live-pill.is-live .live-dot { background: #fff; }
.live-pill.is-live:hover { color: #fff; filter: brightness(1.06); }
.live-pill.is-soon { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.live-pill.is-soon:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.phead .live-pill.is-soon { background: var(--accent-soft); color: var(--accent-ink); border-color: #fcd9a8; }
.phead .live-pill.is-soon:hover { background: #ffe9c7; color: var(--accent-ink); }
.phead .live-badges { margin-top: 10px; }
.live-badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* ── Pruh „Právě živě“ na úvodu ── */
main:has(> .live-strip:first-child + .hero)::before { display: none; }
.live-strip { background: var(--dark-2); color: var(--on-dark); border-bottom: 1px solid var(--dark-line); }
.live-strip-in { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: thin; }
.live-strip-label { display: inline-flex; align-items: center; gap: 8px; font: 800 13px/1 var(--font-head); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; color: #fecaca; }
.live-strip a.live-strip-item { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--dark-line); color: var(--on-dark); white-space: nowrap; font-size: 13px; }
.live-strip a.live-strip-item:hover { border-color: #ef4444; color: #fff; }
.live-strip-item .avatar { box-shadow: none; }
.live-strip-item small { color: var(--on-dark-muted); }
.live-strip-all { margin-left: auto; color: var(--orange); font-weight: 600; font-size: 13px; white-space: nowrap; }

/* ── Karty v přehledu ── */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.lcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.lcard-thumb { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: var(--dark) center / cover no-repeat; }
.lcard-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)); }
.lcard-thumb .avatar { position: relative; z-index: 1; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.lcard.is-ended .lcard-thumb { filter: grayscale(.7); }
.lcard-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lcard-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard-body .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard-viewers { position: absolute; right: 10px; top: 10px; z-index: 2; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: inline-flex; gap: 4px; align-items: center; }
.live-sec { margin-top: 36px; }
.live-mine { margin-bottom: 26px; }
.live-mine h2 { font-size: 16.5px; margin-bottom: 8px; }
.live-mine-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.live-mine-row > span { display: flex; flex-direction: column; min-width: 0; }
.live-mine-row .muted { font-size: 13px; }

/* ── Štítek ŽIVĚ na obrazu a kartě ── */
.live-badge { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: #ef4444; color: #fff; font: 800 11px/1 var(--font-head); letter-spacing: .08em; padding: 5px 9px; border-radius: 6px; }
.live-badge .live-dot { width: 7px; height: 7px; background: #fff; }
.live-badge.is-soon { background: rgba(0, 0, 0, .65); letter-spacing: 0; font-family: var(--font); font-weight: 700; }
.live-badge.is-ended { background: rgba(0, 0, 0, .55); }
.live-badge[hidden] { display: none; }

/* ── Detail a vysílací stránka: video a chat vedle sebe, na mobilu pod sebou ── */
.live-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.live-head-t { flex: 1; min-width: 200px; }
.live-head h1 { font-size: 24px; margin: 0 0 4px; }
.live-head p { margin: 0; font-size: 13px; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.live-main { min-width: 0; }
.live-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.live-stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.live-stage video.is-mirror { transform: scaleX(-1); }
.live-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--on-dark); background: radial-gradient(circle at 50% 40%, #2a2117 0%, #0e0c0a 75%); }
.live-overlay .ico { color: var(--orange); margin-bottom: 8px; }
.live-overlay .msg { margin: 0; font-size: 15px; max-width: 420px; }
.live-overlay.is-hidden { display: none; }
.live-unmute { position: absolute; right: 12px; top: 12px; z-index: 3; display: inline-flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .7); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.live-unmute[hidden] { display: none; }
.live-bar, .live-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.live-bar { justify-content: space-between; font-size: 13px; }
.live-controls #btnStart, .live-controls #btnEnd { margin-left: auto; }
.live-controls .btn-icon.is-off { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
.live-status { font-size: 13px; font-weight: 600; color: var(--muted); }
.live-status.is-on { color: #dc2626; }
.live-status.is-on::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-right: 6px; vertical-align: middle; }
.live-status.is-err { color: var(--danger); }
.live-desc { margin-top: 14px; color: var(--text-2); white-space: pre-line; }
.live-warn { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.live-cancel { margin-top: 10px; }
.live-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.live-viewers { padding: 16px 18px; }
.live-viewers h3 { font-size: 14px; margin: 0 0 10px; display: flex; gap: 6px; align-items: center; }
.live-viewers h3 .muted { margin-left: auto; font-weight: 600; }
.live-viewers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; font-size: 13px; }
.live-viewers li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-viewers li .tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.live-viewers .kick { background: none; border: 0; color: var(--danger); font-size: 12px; cursor: pointer; padding: 2px 4px; }

/* ── Chat ── */
.lchat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); height: 560px; max-height: 75vh; min-height: 320px; }
.live-page .live-layout[data-role="watch"] .lchat { height: calc((100vw - 400px) * 9 / 16); max-height: 560px; }
.lchat-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.lchat-head .badge { margin-left: auto; }
.lchat-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lchat-empty { margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
.lchat-msg { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.lchat-msg .avatar { box-shadow: none; margin-top: 2px; }
.lchat-msg-b { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.lchat-msg-n { font-weight: 700; color: var(--text); margin-right: 6px; }
.lchat-msg-n.is-team { color: var(--accent-ink); }
.lchat-msg-n.is-team::after { content: attr(data-team); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--accent-soft); border: 1px solid #fcd9a8; border-radius: 4px; padding: 0 4px; margin-left: 5px; vertical-align: 1px; }
.lchat-msg time { font-size: 11px; color: var(--muted); margin-left: 4px; }
.lchat-del { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; opacity: 0; transition: opacity .15s; }
.lchat-msg:hover .lchat-del, .lchat-del:focus { opacity: 1; }
.lchat-del:hover { color: var(--danger); }
@media (hover: none) { .lchat-del { opacity: .7; } }
.lchat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.lchat-form input { flex: 1; min-width: 0; }
.lchat-note { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lchat-err { color: var(--danger); font-size: 12px; padding: 0 14px 8px; }

/* ── Formulář nového streamu ── */
.live-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.live-mode { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; }
.live-mode:has(input:checked) { border-color: var(--orange); background: var(--accent-soft); }
.live-mode span { display: flex; flex-direction: column; gap: 2px; }
.live-mode small { color: var(--muted); font-size: 13px; }

@media (max-width: 960px) {
    .live-layout { grid-template-columns: 1fr; }
    .lchat, .live-page .live-layout[data-role="watch"] .lchat { height: 460px; max-height: 70vh; }
}
@media (max-width: 640px) {
    .live-modes { grid-template-columns: 1fr; }
    .live-head h1 { font-size: 19.5px; }
    .live-stage { border-radius: var(--radius-sm); margin: 0 -8px; }
}
