/* --- AIO Video - Live TV: the channel grid, the channel page, the TV layout (big focusable tiles, the player over the whole screen).
       Author: MD OMAR FARUK | www.faruk.bd | Copyright (c) 2026 --- */
.ltv { min-width: 0; --ltv-red: #e41e3f; }
.ltv-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ltv-title h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; flex: 1 1 auto; }
.ltv-title h1 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.ltv-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ltv-red, #e41e3f); box-shadow: 0 0 0 4px rgba(228, 30, 63, .18); display: inline-block; animation: ltv-pulse 1.4s infinite; flex: none; }
.ltv-search { flex: 1 1 260px; max-width: 380px; }
.ltv-search input { width: 100%; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); font: inherit; }
.ltv-tvlink { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ltv-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.ltv-chip { padding: 7px 14px; border-radius: 18px; background: var(--bg-soft); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none !important; outline: none; }
.ltv-chip.on { background: var(--ink); color: var(--bg); }
.ltv-chip:focus-visible { box-shadow: 0 0 0 3px var(--brand, #2f6fed); }
.ltv-h2 { font-size: 18px; margin: 20px 0 10px; }
.ltv-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 12px 0; border-radius: 12px; background: var(--bg-soft); }
.ltv-empty { text-align: center; padding: 30px 16px; color: var(--muted); border-radius: 12px; background: var(--bg-soft); }
.ltv-keys { margin-top: 18px; font-size: 13px; color: var(--muted); }
.ltv-pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.ltv-pager a, .ltv-pager span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg-soft); color: var(--ink); }
.ltv-pager span { background: var(--ink); color: var(--bg); }

/* tiles */
.ltv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.ltv-row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(160px, 180px); overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.ltv-row > * { scroll-snap-align: start; }
.ltv-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; outline: none; transition: transform .12s ease, box-shadow .12s ease; min-width: 0; }
.ltv-card:hover { transform: translateY(-2px); }
.ltv-card:focus-visible, .ltv-card:focus { box-shadow: 0 0 0 3px var(--brand, #2f6fed), 0 8px 24px rgba(0, 0, 0, .25); transform: scale(1.05); z-index: 1; }
.ltv-logo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; border-radius: 10px; background: linear-gradient(135deg, #1d2633, #0d1117); overflow: hidden; }
.ltv-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; }
.ltv-logo b { color: #fff; font-size: 26px; letter-spacing: 1px; }
.ltv-logo.sm { width: 72px; flex: 0 0 72px; }
.ltv-logo.xs { width: 56px; flex: 0 0 56px; border-radius: 6px; }
.ltv-logo.sm b, .ltv-logo.xs b { font-size: 14px; }
.ltv-tag { position: absolute; left: 6px; top: 6px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; color: #fff; text-transform: uppercase; letter-spacing: .4px; }
.ltv-tag.live { background: var(--ltv-red, #e41e3f); }
.ltv-tag.off { background: #555; }
.ltv-star { position: absolute; right: 7px; top: 4px; color: #f7b928; font-style: normal; font-size: 18px; }
.ltv-name { font-weight: 700; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ltv-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-now { font-style: normal; color: var(--ltv-red, #e41e3f); font-weight: 600; }
.ltv-card.is-off { opacity: .55; }

/* the home row */
.ltv-home { margin: 8px 0 24px; }
.ltv-home-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ltv-home-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; }

/* the channel page */
.ltv-watch { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.ltv-stage { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }
.ltv-player, .ltv-player > .aiop { position: absolute; inset: 0; width: 100%; height: 100%; }
.ltv-player .aiop video, .ltv-plain { width: 100%; height: 100%; object-fit: contain; background: #000; border: 0; display: block; }
.ltv-stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.ltv-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--ltv-red, #e41e3f); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .5px; vertical-align: middle; font-style: normal; }
.ltv-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: ltv-pulse 1.4s infinite; }
.ltv-badge.sm { margin-left: auto; font-size: 10px; padding: 1px 6px; }
@keyframes ltv-pulse { 50% { opacity: .25; } }
.ltv-osd { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; align-items: center; color: #fff; background: rgba(0, 0, 0, .55); padding: 6px 10px; border-radius: 8px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 50; }
.ltv-osd.on { opacity: 1; }
.ltv-off, .ltv-gate { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(0, 0, 0, .88); color: #fff; padding: 16px; flex-direction: column; gap: 10px; }
.ltv-off { background: #000; }
.ltv-off[hidden] { display: none; }
.ltv-off b { font-size: 19px; display: block; }
.ltv-off p { color: #ccc; margin: 6px 0 12px; }
.ltv-off-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ltv-bar { display: flex; gap: 12px; align-items: center; padding: 12px 0 4px; flex-wrap: wrap; }
.ltv-what { flex: 1; min-width: 200px; }
.ltv-what h1 { font-size: 20px; margin: 0 0 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ltv-meta { font-size: 13px; color: var(--muted); }
.ltv-meta .ltv-now { margin-left: 8px; }
.ltv-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ltv-acts .btn.on { color: #f7b928; }
.ltv-acts .btn:focus-visible, .ltv-item:focus-visible, .ltv-off .btn:focus-visible { outline: 3px solid var(--brand, #2f6fed); outline-offset: 2px; }
.ltv-about { margin: 10px 2px; color: var(--muted); }
.ltv-aside { padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); max-height: calc(100vh - 100px); overflow: auto; position: sticky; top: 76px; }
.ltv-aside .ltv-h2 { margin: 2px 4px 8px; }
.ltv-list { display: flex; flex-direction: column; gap: 2px; }
.ltv-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: var(--ink); text-decoration: none !important; outline: none; }
.ltv-item:hover, .ltv-item:focus { background: var(--bg-soft); }
.ltv-item.on { background: rgba(228, 30, 63, .12); }
.ltv-item.is-off { opacity: .5; }
.ltv-iname { display: flex; flex-direction: column; min-width: 0; font-weight: 600; font-size: 14px; }
.ltv-iname, .ltv-iname small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-iname small { font-weight: 400; font-size: 12px; color: var(--muted); }
.ltv-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 3000; font-size: 14px; }

@media (max-width: 1100px) {
    .ltv-watch { grid-template-columns: minmax(0, 1fr); }
    .ltv-aside { position: static; max-height: none; }
    .ltv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 600px) {
    .ltv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ltv-row { grid-template-columns: none; grid-auto-columns: 42%; }
    .ltv-search { max-width: none; }
    .ltv-watch .ltv-stage { border-radius: 0; margin: 0 -16px; }
    .ltv-acts { width: 100%; }
    .ltv-acts .btn span { display: none; }
    .ltv-acts .btn { flex: 1; justify-content: center; }
    .ltv-list { grid-template-columns: minmax(0, 1fr); }
    .ltv-keys, .ltv-tvlink { display: none; }
}

/* TV: big tiles, and the player over the whole screen with the channel list sliding in */
.ltv-tvgrid { padding: 12px 20px; }
.ltv-tvgrid .ltv-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.ltv-tvgrid .ltv-name { font-size: 18px; }
.ltv-tvgrid .ltv-title h1 { font-size: 30px; }
.ltv-tvmode .ltv-stage { position: fixed; inset: 0; z-index: 1000; border-radius: 0; aspect-ratio: auto; margin: 0; }
html.ltv-tv, html.ltv-tv body { overflow: hidden; }
.ltv-tvmode .ltv-aside { position: fixed; top: 0; bottom: 0; right: 0; width: min(400px, 90vw); z-index: 1001; max-height: none; border-radius: 0; transform: translateX(105%); transition: transform .2s ease; background: rgba(20, 22, 26, .94); color: #fff; border: 0; }
.ltv-tvmode .ltv-aside .ltv-item, .ltv-tvmode .ltv-aside .ltv-h2 { color: #fff; }
.ltv-tvmode .ltv-aside .ltv-item.on, .ltv-tvmode .ltv-aside .ltv-item:focus { background: rgba(255, 255, 255, .16); }
.ltv-tvmode.list-open .ltv-aside { transform: none; }

/* a channel is live: no clock counting hours of the broadcaster's day, and no seek bar into its past */
.ltv-player .aiop .aiop-time { font-size: 0 !important; }
.ltv-player .aiop .aiop-time::before { content: 'LIVE'; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #fff; background: #e41e3f; padding: 2px 7px; border-radius: 4px; }
.ltv-player .aiop .aiop-scrub { visibility: hidden; }
