/* ── FilmeFarsi Live TV – Frontend Styles ──────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   ARCHIVE – Channel Grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* Archive Header */
.ltv-archive-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(255,255,255,.06);
}
.ltv-archive-title {
	display: flex;
	align-items: center;
	gap: 12px;
}
.ltv-archive-title h1 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
}
.ltv-archive-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: linear-gradient(135deg, #e53e3e, #c53030);
	border-radius: 10px;
	color: #fff;
	font-size: 18px;
}
.ltv-archive-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}
.ltv-live-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	background: rgba(239,68,68,.15);
	border: 1px solid rgba(239,68,68,.3);
	border-radius: 20px;
	color: #ef4444;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .5px;
}
.ltv-channel-count {
	font-size: 13px;
	opacity: .6;
}

/* Filter Tabs */
.ltv-filter-wrap {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 22px;
}
.ltv-filter-tabs {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	flex-wrap: wrap;
}
.ltv-tab {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	border: 1px solid rgba(255,255,255,.1);
	color: inherit;
	opacity: .7;
	transition: all .2s;
	white-space: nowrap;
}
.ltv-tab:hover {
	opacity: 1;
	border-color: #e53e3e;
	color: #e53e3e !important;
}
.ltv-tab.active {
	background: #e53e3e;
	border-color: #e53e3e;
	color: #fff !important;
	opacity: 1;
}
.ltv-tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: rgba(255,255,255,.15);
	border-radius: 9px;
	font-size: 10px;
	font-weight: 700;
}
.ltv-tab.active .ltv-tab-count { background: rgba(255,255,255,.25); }
/* Country flags row */
.ltv-country-flags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(255,255,255,.06);
}
.ltv-flag-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: 20px;
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.08);
	color: rgba(255,255,255,.7);
	font-size: 12px;
	text-decoration: none;
	white-space: nowrap;
	transition: all .15s;
	line-height: 1.4;
}
.ltv-flag-btn span { font-size: 11px; }
.ltv-flag-btn em {
	font-style: normal;
	font-size: 10px;
	background: rgba(255,255,255,.1);
	border-radius: 10px;
	padding: 1px 5px;
	color: rgba(255,255,255,.5);
}
.ltv-flag-btn:hover {
	background: rgba(255,255,255,.1);
	border-color: rgba(255,255,255,.18);
	color: #fff;
}
.ltv-flag-btn.active {
	background: rgba(229,62,62,.15);
	border-color: rgba(229,62,62,.4);
	color: #e53e3e;
}
.ltv-flag-btn.active em { background: rgba(229,62,62,.2); color: #e53e3e; }

/* Channel Grid */
.ltv-channel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 30px;
}
@media (max-width: 480px) {
	.ltv-channel-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Channel Card */
.ltv-card { border-radius: 12px; overflow: hidden; }
.ltv-card-link {
	display: block;
	text-decoration: none !important;
	color: inherit;
}
.ltv-card-screen {
	position: relative;
	aspect-ratio: 4/3;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	border-radius: 12px 12px 0 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255,255,255,.06);
	transition: transform .2s;
}
.ltv-card:hover .ltv-card-screen { transform: translateY(-2px); }
.ltv-card-logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 75%;
	height: 70%;
}
.ltv-card-logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 4px 12px rgba(0,0,0,.4));
}
.ltv-card-initials {
	font-size: 32px;
	font-weight: 800;
	color: rgba(255,255,255,.25);
	letter-spacing: 2px;
}

/* Card badges */
.ltv-card-tl {
	position: absolute;
	top: 8px;
	left: 8px;
	display: flex;
	gap: 5px;
	align-items: center;
}
.ltv-card-tr {
	position: absolute;
	top: 8px;
	right: 8px;
}
.ltv-card-number {
	background: rgba(0,0,0,.6);
	color: rgba(255,255,255,.7);
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	border: 1px solid rgba(255,255,255,.1);
}
.ltv-card-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(239,68,68,.85);
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .8px;
	padding: 2px 7px;
	border-radius: 4px;
}
.ltv-card-quality {
	font-size: 9px;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 4px;
	letter-spacing: .5px;
}

/* Card hover overlay */
.ltv-card-hover {
	position: absolute;
	inset: 0;
	background: rgba(229,62,62,.85);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	opacity: 0;
	transition: opacity .2s;
	border-radius: 12px 12px 0 0;
}
.ltv-card:hover .ltv-card-hover { opacity: 1; }
.ltv-card-play-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255,255,255,.2);
	border: 2px solid rgba(255,255,255,.8);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: #fff;
}
.ltv-card-watch-text {
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	letter-spacing: .5px;
}

/* Card Info */
.ltv-card-info {
	padding: 10px 12px;
	background: rgba(255,255,255,.03);
	border: 1px solid rgba(255,255,255,.06);
	border-top: none;
	border-radius: 0 0 12px 12px;
}
.ltv-card-name {
	margin: 0 0 5px;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ltv-card-terms {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	font-size: 10px;
	opacity: .6;
}
.ltv-card-country, .ltv-card-cat {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

/* No channels state */
.ltv-no-channels {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	opacity: .6;
}
.ltv-no-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.ltv-no-channels h3 { margin-bottom: 8px; }
.ltv-btn-reset {
	display: inline-block;
	margin-top: 12px;
	padding: 8px 20px;
	background: #e53e3e;
	color: #fff !important;
	border-radius: 8px;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 600;
}

/* Quality colour badges – shared */
.ltv-q-4k   { background:#7c3aed; color:#fff; }
.ltv-q-fhd  { background:#1d4ed8; color:#fff; }
.ltv-q-hd   { background:#15803d; color:#fff; }
.ltv-q-sd   { background:#b45309; color:#fff; }
.ltv-q-ld   { background:#6b7280; color:#fff; }

/* LIVE dot – shared */
.ltv-live-dot-sm {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 5px #ef4444;
	animation: ltv-live-pulse 1.8s ease-in-out infinite;
	flex-shrink: 0;
}
@keyframes ltv-live-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%       { opacity: .5; transform: scale(.8); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE – TV Frame & Player
   ═══════════════════════════════════════════════════════════════════════════ */

.ltv-single-wrap { overflow: visible; }
.ltv-player-row,
.ltv-lower {
	max-width: 100%;
	box-sizing: border-box;
}
.ltv-player-section {
	margin-bottom: 30px;
	max-width: 100%;
	overflow: hidden;
}
/* Ensure sections stay within content column */
.ltv-single-wrap .sheader.ltv-channel-header {
	overflow: hidden;
	clear: both;
	width: 100%;
	float: left;
}
.ltv-single-wrap .sbox {
	overflow: hidden;
	clear: both;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* ── TV Outer ───────────────────────────────────────────────────────────────── */
.ltv-tv-outer {
	margin: 0 auto;
	max-width: 860px;
	user-select: none;
}

/* ── TV Body (Bezel) ────────────────────────────────────────────────────────── */
.ltv-tv-body {
	position: relative;
	background: linear-gradient(170deg, #323232 0%, #1e1e1e 45%, #141414 100%);
	border-radius: 18px 18px 8px 8px;
	padding: 16px 18px 44px;
	box-shadow:
		0 0 0 1px rgba(255,255,255,.07),
		0 0 0 2px rgba(0,0,0,.6),
		0 40px 100px rgba(0,0,0,.85),
		inset 0 1px 0 rgba(255,255,255,.12),
		inset 0 -2px 4px rgba(0,0,0,.5);
	transition: box-shadow .4s ease;
}
/* Glow when playing */
.ltv-tv-body.ltv-playing {
	box-shadow:
		0 0 0 1px rgba(255,255,255,.07),
		0 0 0 2px rgba(0,0,0,.6),
		0 40px 100px rgba(0,0,0,.85),
		0 0 80px rgba(229,62,62,.15),
		inset 0 1px 0 rgba(255,255,255,.12);
}
/* Top decorative strip */
.ltv-bezel-top {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 14px;
	margin-bottom: 10px;
}
.ltv-cam-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2a2a2a;
	box-shadow:
		0 0 0 1px rgba(255,255,255,.1),
		inset 0 1px 0 rgba(255,255,255,.05),
		0 0 6px rgba(229,62,62,.4);
}

/* ── Screen ─────────────────────────────────────────────────────────────────── */
.ltv-screen {
	position: relative;
	background: #000;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	box-shadow:
		inset 0 0 0 2px rgba(0,0,0,.9),
		inset 0 0 60px rgba(0,0,0,.7),
		0 0 30px rgba(0,0,0,.5);
}
.ltv-video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #000;
}

/* Glass reflection */
.ltv-screen-glass {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 8;
	border-radius: 6px;
	background:
		linear-gradient(135deg,
			rgba(255,255,255,.045) 0%,
			transparent 45%,
			rgba(0,0,0,.08) 100%);
}

/* ── Overlays ───────────────────────────────────────────────────────────────── */
.ltv-overlay-tl,
.ltv-overlay-tr {
	position: absolute;
	top: 12px;
	z-index: 20;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .8px;
	pointer-events: none;
}
.ltv-overlay-tl {
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	background: rgba(239,68,68,.9);
	color: #fff;
	border-radius: 5px;
}
.ltv-overlay-tr {
	right: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	color: #fff;
}

/* State panels (start / loading / error) */
.ltv-state-panel {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(0,0,0,.78);
	backdrop-filter: blur(2px);
	color: #fff;
	text-align: center;
	padding: 20px;
}
/* Start panel is fully clickable */
#ltv-state-start { cursor: pointer; }
.ltv-state-hidden { display: none !important; }

/* Watch Live button */
.ltv-watch-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #fff;
	padding: 0;
	outline: none;
}

/* Pulsing rings */
.ltv-watch-ring {
	position: absolute;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	border: 2px solid rgba(229,62,62,.35);
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% - 8px)) scale(.9);
	animation: ltv-ring-pulse 2.4s cubic-bezier(.4,0,.2,1) infinite;
	pointer-events: none;
}
.ltv-watch-ring-2 {
	width: 96px;
	height: 96px;
	border-color: rgba(197,48,48,.25);
	animation-delay: 1.2s;
}
@keyframes ltv-ring-pulse {
	0%   { transform: translate(-50%, calc(-50% - 8px)) scale(.9); opacity: .7; }
	100% { transform: translate(-50%, calc(-50% - 8px)) scale(1.8); opacity: 0; }
}

/* The circle */
.ltv-watch-icon {
	position: relative;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: linear-gradient(145deg, #e53e3e 0%, #c53030 50%, #9b2c2c 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow:
		0 0 0 4px rgba(229,62,62,.15),
		0 8px 30px rgba(229,62,62,.45),
		inset 0 1px 1px rgba(255,255,255,.25);
	transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s cubic-bezier(.4,0,.2,1);
	z-index: 1;
}
.ltv-watch-icon::before {
	content: '';
	position: absolute;
	inset: 2px;
	border-radius: 50%;
	background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 60%);
	pointer-events: none;
}

/* Pure CSS play triangle — perfectly centered */
.ltv-play-tri {
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 12px 0 12px 22px;
	border-color: transparent transparent transparent #fff;
	margin-left: 4px;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
	position: relative;
	z-index: 2;
}

/* Hover / focus */
.ltv-watch-btn:hover .ltv-watch-icon,
.ltv-watch-btn:focus-visible .ltv-watch-icon {
	transform: scale(1.1);
	box-shadow:
		0 0 0 6px rgba(229,62,62,.2),
		0 12px 44px rgba(197,48,48,.6),
		inset 0 1px 1px rgba(255,255,255,.3);
}
.ltv-watch-btn:active .ltv-watch-icon {
	transform: scale(.97);
}

/* Label */
.ltv-watch-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-shadow: 0 1px 4px rgba(0,0,0,.5);
	opacity: .85;
	transition: opacity .2s;
}
.ltv-watch-btn:hover .ltv-watch-label {
	opacity: 1;
}
.ltv-start-logo {
	position: absolute;
	bottom: 20px;
	opacity: .3;
}
.ltv-start-logo img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	filter: grayscale(1) brightness(3);
}

/* Loading spinner (4-ring CSS) */
.ltv-spinner-ring {
	display: inline-flex;
	position: relative;
	width: 48px;
	height: 48px;
}
.ltv-spinner-ring div {
	box-sizing: border-box;
	display: block;
	position: absolute;
	width: 40px;
	height: 40px;
	margin: 4px;
	border: 3px solid transparent;
	border-top-color: #e53e3e;
	border-radius: 50%;
	animation: ltv-spin 1.2s cubic-bezier(.5,.2,.5,.8) infinite;
}
.ltv-spinner-ring div:nth-child(1) { animation-delay: -0.45s; }
.ltv-spinner-ring div:nth-child(2) { animation-delay: -0.3s; }
.ltv-spinner-ring div:nth-child(3) { animation-delay: -0.15s; }
.ltv-spinner-ring div:nth-child(4) { animation-delay: 0s; }
@keyframes ltv-spin {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
.ltv-state-panel p { margin: 0; font-size: 13px; opacity: .7; }

/* Error state */
.ltv-error-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(239,68,68,.2);
	border: 2px solid rgba(239,68,68,.5);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #ef4444;
}
.ltv-retry-btn {
	padding: 8px 20px;
	background: #e53e3e;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ltv-retry-btn:hover { background: #3070c7; }
.ltv-nostream-icon { font-size: 36px; opacity: .3; }

/* ── Bottom Bezel ───────────────────────────────────────────────────────────── */
.ltv-bezel-bottom {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 0 20px;
}
.ltv-power-led {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 8px #22c55e;
	animation: ltv-led-blink 3s ease-in-out infinite;
	flex-shrink: 0;
}
.ltv-tv-body:not(.ltv-playing) .ltv-power-led {
	background: #dc2626;
	box-shadow: 0 0 5px #dc2626;
	animation: none;
}
@keyframes ltv-led-blink {
	0%, 90%, 100% { opacity: 1; }
	95%            { opacity: .3; }
}
.ltv-tv-brandname {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: rgba(255,255,255,.18);
}
.ltv-bezel-speakers {
	display: flex;
	gap: 2px;
	align-items: center;
}
.ltv-bezel-speakers span {
	display: block;
	width: 2px;
	height: 10px;
	background: rgba(255,255,255,.08);
	border-radius: 1px;
}
.ltv-bezel-speakers span:nth-child(2),
.ltv-bezel-speakers span:nth-child(4) { height: 14px; }
.ltv-bezel-speakers span:nth-child(3) { height: 16px; }

/* ── TV Stand ───────────────────────────────────────────────────────────────── */
.ltv-stand-neck {
	width: 100px;
	height: 22px;
	margin: 0 auto;
	background: linear-gradient(180deg, #1a1a1a 0%, #282828 100%);
	clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
}
.ltv-stand-base {
	width: 260px;
	height: 14px;
	margin: 0 auto;
	background: linear-gradient(180deg, #282828 0%, #1a1a1a 100%);
	border-radius: 0 0 10px 10px;
	box-shadow: 0 6px 20px rgba(0,0,0,.7);
}

/* ── Controls Overlay Bar (inside screen) ───────────────────────────────────── */
.ltv-controls {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 25;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 28px 12px 10px;
	background: linear-gradient(transparent, rgba(0,0,0,.88));
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease;
	pointer-events: none;
}
.ltv-controls.ltv-ctrl-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.ltv-ctrl-left {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
.ltv-ctrl-sources {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1;
	justify-content: center;
	flex-wrap: wrap;
}
.ltv-ctrl-right {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

/* Control buttons */
.ltv-ctrl-btn {
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: none;
	background: rgba(255,255,255,.15);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
	flex-shrink: 0;
}
.ltv-ctrl-btn:hover,
.ltv-ctrl-btn:active {
	background: rgba(255,255,255,.28);
}

/* Volume group */
.ltv-vol-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
}
.ltv-vol-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 72px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255,255,255,.3);
	outline: none;
	cursor: pointer;
	flex-shrink: 0;
}
.ltv-vol-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.ltv-vol-slider::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: none;
	cursor: pointer;
}

/* Source buttons inside overlay */
.ltv-src-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 6px;
	border: 1px solid rgba(255,255,255,.25);
	background: rgba(255,255,255,.1);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: all .15s;
	white-space: nowrap;
}
.ltv-src-btn:hover  { background: rgba(255,255,255,.22); }
.ltv-src-btn.ltv-src-active {
	border-color: #e53e3e;
	background: rgba(229,62,62,.3);
}
.ltv-src-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
}
.ltv-src-healthy   { background: #22c55e; box-shadow: 0 0 4px #22c55e; }
.ltv-src-unhealthy { background: #ef4444; box-shadow: 0 0 4px #ef4444; }
.ltv-src-unchecked { background: #94a3b8; }

/* Auto-failover icon toggle */
.ltv-ctrl-failover {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	cursor: pointer;
	opacity: .45;
	color: #fff;
	font-size: 13px;
	transition: opacity .15s, color .15s;
}
.ltv-ctrl-failover input { display: none; }
.ltv-ctrl-failover:has(input:checked) { opacity: 1; color: #e53e3e; }

/* ── Channel Header ─────────────────────────────────────────────────────────── */

/* Override DooPlay theme's float/padding-top layout entirely */
.ltv-channel-header.sheader {
	display: flex !important;
	align-items: center !important;
	gap: 20px !important;
	padding: 20px !important;
	overflow: visible !important;
	background: linear-gradient(135deg, rgba(26,26,46,.7) 0%, rgba(22,33,62,.7) 100%);
	border: 1px solid rgba(255,255,255,.07);
	border-radius: 14px;
	margin-bottom: 24px;
}

/* Logo wrap — neutralise theme .poster padding-top trick */
.ltv-channel-header .ltv-channel-logo-wrap.poster {
	float: none !important;
	width: 110px !important;
	min-width: 110px !important;
	height: 110px !important;
	padding: 0 !important;
	padding-top: 0 !important;
	margin: 0 !important;
	position: relative !important;
	overflow: hidden !important;
	border-radius: 12px;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.08);
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
}

/* Logo image */
.ltv-channel-logo {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	padding: 10px;
	box-sizing: border-box;
}

/* Fallback initials */
.ltv-logo-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	font-weight: 900;
	color: rgba(255,255,255,.2);
}

/* Data column — neutralise theme margin-left */
.ltv-channel-header .data.ltv-channel-data {
	width: auto !important;
	margin-left: 0 !important;
	padding: 0 !important;
	flex: 1;
	min-width: 0;
}
.ltv-channel-header .data.ltv-channel-data h1 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 10px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ltv-channel-header .extra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

/* Meta badges */
.ltv-ch-number {
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.12);
	padding: 3px 9px;
	border-radius: 5px;
	font-size: 11px;
	font-weight: 700;
}
.ltv-ch-cat, .ltv-ch-lang {
	padding: 3px 9px;
	border-radius: 5px;
	font-size: 11px;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.08);
}
.ltv-ch-quality {
	padding: 3px 9px;
	border-radius: 5px;
	font-size: 11px;
	font-weight: 800;
}
.ltv-ch-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
}
.ltv-active   { background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.25);  color: #22c55e; }
.ltv-inactive { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.2);   color: #ef4444; }

/* Mobile: stack logo above text */
@media (max-width: 540px) {
	.ltv-channel-header.sheader {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 14px !important;
	}
	.ltv-channel-header .ltv-channel-logo-wrap.poster {
		width: 80px !important;
		min-width: 80px !important;
		height: 80px !important;
	}
	.ltv-channel-header .data.ltv-channel-data h1 { font-size: 18px; }
}

/* Health summary row */
.ltv-health-summary {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 8px;
}
.ltv-hs-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
}
.ltv-hs-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
}
.ltv-hs-healthy   { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.25); color: #22c55e; }
.ltv-hs-healthy .ltv-hs-dot   { background: #22c55e; }
.ltv-hs-unhealthy { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2);  color: #ef4444; }
.ltv-hs-unhealthy .ltv-hs-dot { background: #ef4444; }
.ltv-hs-unchecked { background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.2); color: #94a3b8; }
.ltv-hs-unchecked .ltv-hs-dot { background: #94a3b8; }

/* About section */
.ltv-about-text { line-height: 1.7; }
.ltv-muted { opacity: .5; font-style: italic; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.ltv-tv-outer { max-width: 100%; }
	.ltv-tv-body  { padding: 10px 10px 36px; }
	.ltv-stand-neck { width: 60px; }
	.ltv-stand-base { width: 160px; }
	.ltv-watch-icon { width: 58px; height: 58px; }
	.ltv-play-tri { border-width: 10px 0 10px 18px; margin-left: 3px; }
	.ltv-watch-ring, .ltv-watch-ring-2 { width: 80px; height: 80px; }
}
@media (max-width: 480px) {
	.ltv-tv-body { border-radius: 12px 12px 4px 4px; padding: 8px 8px 30px; }

	/* Controls bar on small screens */
	.ltv-controls { padding: 20px 8px 8px; gap: 4px; }
	.ltv-ctrl-btn { width: 42px; height: 42px; font-size: 15px; }
	.ltv-vol-slider { width: 55px; }

	/* Hide source labels on tiny screens – show dot only */
	.ltv-src-btn .ltv-src-label { display: none; }
	.ltv-src-btn { padding: 5px 8px; min-width: 28px; justify-content: center; }

	/* Hide failover toggle – it still works, just no UI clutter */
	.ltv-ctrl-failover { display: none; }
}

/* ── Single page layout ──────────────────────────────────────────────────────── */

/* Player row: player on left, sidebar on right */
.ltv-player-row {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	width: 100%;
}
.ltv-player-col {
	flex: 1 1 0;
	min-width: 0;
}
.ltv-sidebar-col {
	flex: 0 0 300px;
	width: 300px;
}

/* Lower sections: full width */
.ltv-lower {
	width: 100%;
}

@media (max-width: 900px) {
	.ltv-player-row {
		flex-direction: column;
		gap: 0;
	}
	.ltv-sidebar-col {
		flex: 0 0 auto;
		width: 100%;
		margin-top: 24px;
	}
}
