/* ==========================================================================
   Simple Live Stream Player - Frontend Styles
   ========================================================================== */

.slsp-player-wrapper {
	--slsp-accent: #e11d48;
	--slsp-radius: 12px;
	--slsp-aspect-ratio: 16/9;
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.slsp-stream-grid .slsp-player-wrapper {
	container-type: inline-size;
	container-name: slsp-player;
}

.slsp-player-wrapper *,
.slsp-player-wrapper *::before,
.slsp-player-wrapper *::after {
	box-sizing: border-box;
}

.slsp-stage {
	position: relative;
	width: 100%;
	aspect-ratio: var(--slsp-aspect-ratio, 16/9);
	background: #0b0f17;
	border-radius: var(--slsp-radius, 12px);
	overflow: hidden;
	isolation: isolate;
	box-shadow: 0 14px 36px rgba(11, 15, 23, 0.22);
}

.slsp-video,
.slsp-iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: inherit;
	clip-path: inset(0 round var(--slsp-radius, 12px));
	background: #000;
}

.slsp-video {
	object-fit: contain;
}

/* Top Bar: LIVE Badge + Optional Stream Title */
.slsp-top-bar {
	position: absolute;
	top: 14px;
	left: 14px;
	right: 14px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 10px;
	pointer-events: none;
}

.slsp-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--slsp-accent, #e11d48);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}

.slsp-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ffffff;
	animation: slsp-pulse 1.6s ease-in-out infinite;
}

@keyframes slsp-pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.45;
		transform: scale(0.8);
	}
}

.slsp-stream-title {
	display: inline-block;
	max-width: calc(100% - 100px);
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f8fafc;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Offline Screen */
.slsp-offline-screen {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background-color: #0f172a;
	background-position: center;
	background-size: cover;
	border-radius: inherit;
	color: #f8fafc;
	text-align: center;
}

.slsp-offline-backdrop {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.92));
}

.slsp-offline-content {
	position: relative;
	z-index: 2;
	max-width: 480px;
}

.slsp-offline-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: var(--slsp-accent, #e11d48);
}

.slsp-offline-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 6px;
	color: #ffffff;
}

.slsp-offline-message {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #cbd5e1;
}

/* Error / Stream Unreachable Overlay */
.slsp-error-overlay[hidden] {
	display: none;
}

.slsp-error-overlay {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	border-radius: inherit;
	background: rgba(11, 15, 23, 0.88);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #f8fafc;
	text-align: center;
}

.slsp-error-box {
	max-width: 420px;
}

.slsp-error-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: var(--slsp-accent, #e11d48);
	color: #ffffff;
	font-weight: 800;
	font-size: 20px;
}

.slsp-error-text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #e2e8f0;
}

.slsp-player-wrapper .slsp-stage button.slsp-retry-btn {
	appearance: none;
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	background: var(--slsp-accent, #e11d48);
	background-color: var(--slsp-accent, #e11d48);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.slsp-player-wrapper .slsp-stage button.slsp-retry-btn:hover,
.slsp-player-wrapper .slsp-stage button.slsp-retry-btn:focus,
.slsp-player-wrapper .slsp-stage button.slsp-retry-btn:focus-visible,
.slsp-player-wrapper .slsp-stage button.slsp-retry-btn:active {
	background: var(--slsp-accent, #e11d48);
	background-color: var(--slsp-accent, #e11d48);
	color: #ffffff;
	opacity: 0.9;
	transform: translateY(-1px);
	outline: none;
}

@media (max-width: 600px) {
	.slsp-top-bar {
		top: 10px;
		left: 10px;
		right: 10px;
	}

	.slsp-stream-title {
		display: none;
	}
}

/* ==========================================================================
   Modern Custom Controls UI
   ========================================================================== */

.slsp-style-modern .slsp-stage {
	user-select: none;
	-webkit-user-select: none;
}

.slsp-style-modern .slsp-stage:fullscreen,
.slsp-style-modern .slsp-stage:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	max-width: none;
	aspect-ratio: auto;
	border-radius: 0 !important;
	--slsp-radius: 0px !important;
}

.slsp-style-modern .slsp-stage:fullscreen .slsp-video,
.slsp-style-modern .slsp-stage:-webkit-full-screen .slsp-video {
	clip-path: none !important;
}

.slsp-style-modern .slsp-stage.is-modern-active .slsp-video {
	cursor: pointer;
}

.slsp-style-modern .slsp-stage.is-playing:not(.is-controls-visible) .slsp-video {
	cursor: none;
}

/* Central Big Play Button */
.slsp-player-wrapper .slsp-stage button.slsp-big-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.62);
	background-color: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: #ffffff;
	cursor: pointer;
	transform: translate(-50%, -50%) scale(1);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
	transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.slsp-big-play svg {
	margin-left: 3px;
}

.slsp-player-wrapper .slsp-stage button.slsp-big-play:focus:not(:focus-visible),
.slsp-player-wrapper .slsp-stage button.slsp-big-play:active {
	background: rgba(15, 23, 42, 0.62);
	background-color: rgba(15, 23, 42, 0.62);
	color: #ffffff;
	outline: none;
}

.slsp-player-wrapper .slsp-stage button.slsp-big-play:hover,
.slsp-player-wrapper .slsp-stage button.slsp-big-play:focus-visible {
	background: var(--slsp-accent, #e11d48);
	background-color: var(--slsp-accent, #e11d48);
	border-color: rgba(255, 255, 255, 0.45);
	color: #ffffff;
	transform: translate(-50%, -50%) scale(1.08);
	outline: none;
}

.slsp-stage.is-playing .slsp-big-play,
.slsp-stage.is-buffering .slsp-big-play {
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%) scale(0.9);
}

/* Buffering Spinner */
.slsp-buffering-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border: 3px solid rgba(255, 255, 255, 0.22);
	border-top-color: var(--slsp-accent, #e11d48);
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
	animation: slsp-spin 0.85s linear infinite;
}

.slsp-stage.is-buffering .slsp-buffering-spinner {
	opacity: 1;
}

@keyframes slsp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Bottom Control Bar */
.slsp-controls-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 4;
	padding: 36px 14px 12px;
	border-bottom-left-radius: inherit;
	border-bottom-right-radius: inherit;
	background: linear-gradient(to top, rgba(6, 10, 18, 0.92) 0%, rgba(6, 10, 18, 0.55) 62%, transparent 100%);
	color: #f8fafc;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.24s ease, transform 0.24s ease;
}

.slsp-stage.is-playing:not(.is-controls-visible):not(.is-menu-open) .slsp-controls-bar {
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
}

.slsp-stage.is-playing:not(.is-controls-visible):not(.is-menu-open) .slsp-top-bar {
	opacity: 0.75;
	transition: opacity 0.24s ease;
}

/* Progress / Seek Bar (VOD & DVR) */
.slsp-progress-wrap[hidden] {
	display: none;
}

.slsp-progress-wrap {
	margin-bottom: 10px;
}

.slsp-seek-slider {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 5px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.24);
	outline: none;
	cursor: pointer;
	transition: height 0.14s ease;
}

.slsp-seek-slider:hover {
	height: 7px;
}

.slsp-seek-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid var(--slsp-accent, #e11d48);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	cursor: pointer;
}

.slsp-seek-slider::-moz-range-thumb {
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid var(--slsp-accent, #e11d48);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
	cursor: pointer;
}

/* Controls Row */
.slsp-controls-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.slsp-controls-left,
.slsp-controls-right {
	display: flex;
	align-items: center;
	gap: 6px;
}

.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border: 0;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.08);
	background-color: rgba(255, 255, 255, 0.08);
	color: #f8fafc;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn:focus {
	background: rgba(255, 255, 255, 0.08);
	background-color: rgba(255, 255, 255, 0.08);
	color: #f8fafc;
	outline: none;
}

.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn:hover,
.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	background-color: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	outline: none;
}

.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn:active {
	transform: scale(0.95);
}

.slsp-player-wrapper .slsp-stage button.slsp-ctrl-play,
.slsp-player-wrapper .slsp-stage button.slsp-ctrl-play:focus,
.slsp-player-wrapper .slsp-stage button.slsp-ctrl-play:active {
	background: var(--slsp-accent, #e11d48);
	background-color: var(--slsp-accent, #e11d48);
	color: #ffffff;
	outline: none;
}

.slsp-player-wrapper .slsp-stage button.slsp-ctrl-play:hover,
.slsp-player-wrapper .slsp-stage button.slsp-ctrl-play:focus-visible {
	background: var(--slsp-accent, #e11d48);
	background-color: var(--slsp-accent, #e11d48);
	color: #ffffff;
	filter: brightness(1.1);
	outline: none;
}

/* Volume Group */
.slsp-volume-group {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding-right: 4px;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.08);
}

.slsp-player-wrapper .slsp-stage .slsp-volume-group button.slsp-ctrl-btn,
.slsp-player-wrapper .slsp-stage .slsp-volume-group button.slsp-ctrl-btn:focus {
	background: transparent;
	background-color: transparent;
}

.slsp-player-wrapper .slsp-stage .slsp-volume-group button.slsp-ctrl-btn:hover,
.slsp-player-wrapper .slsp-stage .slsp-volume-group button.slsp-ctrl-btn:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	background-color: rgba(255, 255, 255, 0.12);
}

.slsp-volume-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 0;
	opacity: 0;
	height: 4px;
	margin: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.3);
	outline: none;
	cursor: pointer;
	transition: width 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.slsp-volume-group:hover .slsp-volume-slider,
.slsp-volume-group:focus-within .slsp-volume-slider {
	width: 66px;
	opacity: 1;
	margin: 0 6px 0 2px;
}

.slsp-volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #ffffff;
	cursor: pointer;
}

.slsp-volume-slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #ffffff;
	border: 0;
	cursor: pointer;
}

/* Live Pill / Timecode */
.slsp-player-wrapper .slsp-stage button.slsp-live-pill {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 10px;
	margin-left: 2px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.55);
	background-color: rgba(15, 23, 42, 0.55);
	color: #e2e8f0;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.16s ease, border-color 0.16s ease;
}

.slsp-player-wrapper .slsp-stage button.slsp-live-pill:focus {
	background: rgba(15, 23, 42, 0.55);
	background-color: rgba(15, 23, 42, 0.55);
	color: #e2e8f0;
	outline: none;
}

.slsp-player-wrapper .slsp-stage button.slsp-live-pill:hover,
.slsp-player-wrapper .slsp-stage button.slsp-live-pill:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	background-color: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.3);
	color: #ffffff;
	outline: none;
}

.slsp-live-pill-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}

.slsp-live-pill.is-behind .slsp-live-pill-dot {
	background: #f59e0b;
	box-shadow: none;
}

.slsp-timecode {
	padding: 0 6px;
	font-size: 12px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #e2e8f0;
}

.slsp-timecode[hidden],
.slsp-live-pill[hidden],
.slsp-ctrl-btn[hidden],
.slsp-quality-wrap[hidden] {
	display: none;
}

/* Quality Selector Menu */
.slsp-quality-wrap {
	position: relative;
}

.slsp-quality-badge {
	font-size: 11px;
	letter-spacing: 0.03em;
}

.slsp-quality-menu[hidden] {
	display: none;
}

.slsp-quality-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	z-index: 10;
	min-width: 132px;
	padding: 6px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 11px;
	background: rgba(15, 23, 42, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.slsp-player-wrapper .slsp-stage button.slsp-quality-option {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 7px 10px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	background-color: transparent;
	color: #e2e8f0;
	font-size: 12px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.slsp-player-wrapper .slsp-stage button.slsp-quality-option:hover,
.slsp-player-wrapper .slsp-stage button.slsp-quality-option:focus,
.slsp-player-wrapper .slsp-stage button.slsp-quality-option:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	background-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	outline: none;
}

.slsp-player-wrapper .slsp-stage button.slsp-quality-option.is-selected,
.slsp-player-wrapper .slsp-stage button.slsp-quality-option.is-selected:hover,
.slsp-player-wrapper .slsp-stage button.slsp-quality-option.is-selected:focus,
.slsp-player-wrapper .slsp-stage button.slsp-quality-option.is-selected:focus-visible {
	background: var(--slsp-accent, #e11d48);
	background-color: var(--slsp-accent, #e11d48);
	color: #ffffff;
	outline: none;
}

@media (max-width: 640px) {
	.slsp-player-wrapper .slsp-stage button.slsp-big-play {
		width: 46px;
		height: 46px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-big-play svg {
		width: 18px;
		height: 18px;
	}

	.slsp-controls-bar {
		padding: 16px 8px 6px;
		background: linear-gradient(to top, rgba(10, 14, 23, 0.82) 0%, rgba(10, 14, 23, 0.32) 60%, transparent 100%);
	}

	.slsp-controls-row {
		gap: 4px;
	}

	.slsp-controls-left,
	.slsp-controls-right {
		gap: 4px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn {
		min-width: 28px;
		height: 28px;
		padding: 0 6px;
		border-radius: 7px;
		touch-action: manipulation;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn svg {
		width: 15px;
		height: 15px;
	}

	.slsp-live-pill {
		padding: 2px 7px;
		font-size: 10px;
	}

	.slsp-time-display {
		font-size: 11px;
	}

	.slsp-volume-group:hover .slsp-volume-slider,
	.slsp-volume-group:focus-within .slsp-volume-slider {
		width: 0;
		opacity: 0;
		margin: 0;
	}
}

@media (max-width: 440px) {
	.slsp-time-display {
		display: none;
	}
}

/* Container-based compact controls for small players (e.g. multicast grid cards) */
@container slsp-player (max-width: 460px) {
	.slsp-top-bar {
		top: 9px;
		left: 9px;
		right: 9px;
		gap: 6px;
	}

	.slsp-live-badge {
		padding: 3px 8px;
		font-size: 10px;
		gap: 5px;
	}

	.slsp-live-dot {
		width: 6px;
		height: 6px;
	}

	.slsp-stream-title {
		padding: 3px 8px;
		font-size: 11px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-big-play {
		width: 46px;
		height: 46px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-big-play svg {
		width: 18px;
		height: 18px;
	}

	.slsp-controls-bar {
		padding: 16px 8px 6px;
	}

	.slsp-controls-row,
	.slsp-controls-left,
	.slsp-controls-right {
		gap: 4px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn {
		min-width: 28px;
		height: 28px;
		padding: 0 6px;
		border-radius: 7px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn svg {
		width: 14px;
		height: 14px;
	}

	.slsp-live-pill {
		padding: 2px 7px;
		font-size: 10px;
	}

	.slsp-volume-group:hover .slsp-volume-slider,
	.slsp-volume-group:focus-within .slsp-volume-slider {
		width: 48px;
	}
}

@container slsp-player (max-width: 320px) {
	.slsp-player-wrapper .slsp-stage button.slsp-big-play {
		width: 40px;
		height: 40px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-big-play svg {
		width: 16px;
		height: 16px;
	}

	.slsp-player-wrapper .slsp-stage button.slsp-ctrl-btn {
		min-width: 26px;
		height: 26px;
		padding: 0 5px;
		border-radius: 6px;
	}

	.slsp-time-display {
		display: none;
	}
}

/* ==========================================================================
   Channel Logo Overlay (visible when stream is not playing)
   ========================================================================== */

.slsp-logo-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: radial-gradient(circle at center, rgba(11, 15, 23, 0.36) 0%, rgba(11, 15, 23, 0.64) 100%);
	pointer-events: none;
	opacity: 1;
	transform: scale(1);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.slsp-channel-logo {
	display: block;
	max-width: min(52%, 220px);
	max-height: 46%;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}

.slsp-logo-overlay.slsp-logo-pos-top-right {
	align-items: flex-start;
	justify-content: flex-end;
	padding: 14px 16px;
	background: linear-gradient(225deg, rgba(11, 15, 23, 0.55) 0%, rgba(11, 15, 23, 0) 45%);
}

.slsp-logo-overlay.slsp-logo-pos-top-right .slsp-channel-logo {
	max-width: min(30%, 116px);
	max-height: 44px;
}

.slsp-stage.is-playing .slsp-logo-overlay {
	opacity: 0;
	transform: scale(0.96);
}

.slsp-offline-logo {
	margin: 0 auto 14px;
}

.slsp-offline-logo img {
	display: inline-block;
	max-width: 160px;
	max-height: 76px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

/* ==========================================================================
   Multicast Stream Grid
   ========================================================================== */

.slsp-stream-grid {
	display: grid;
	gap: var(--slsp-grid-gap, 20px);
	width: 100%;
	box-sizing: border-box;
}

.slsp-grid-layout-columns {
	grid-template-columns: repeat(var(--slsp-grid-cols, 3), minmax(0, 1fr));
}

.slsp-grid-layout-rows {
	grid-template-columns: minmax(0, 1fr);
}

.slsp-grid-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-radius: 14px;
	background: rgba(15, 23, 42, 0.04);
	border: 1px solid rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.slsp-grid-card-header {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 11px 14px;
}

.slsp-grid-card-status {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.slsp-grid-card.is-offline .slsp-grid-card-status {
	background: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.slsp-grid-card-title {
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.slsp-grid-card-player {
	width: 100%;
}

.slsp-grid-empty {
	padding: 18px 20px;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	background: #f8fafc;
	color: #475569;
	font-size: 13.5px;
	text-align: center;
}

@media (max-width: 1024px) {
	.slsp-grid-layout-columns {
		grid-template-columns: repeat(var(--slsp-grid-cols-tablet, 2), minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.slsp-grid-layout-columns {
		grid-template-columns: repeat(var(--slsp-grid-cols-mobile, 1), minmax(0, 1fr));
	}
}

/* ==========================================================================
   Floating Mini Player (out-of-viewport single stream)
   ========================================================================== */

.slsp-mini-close {
	display: none;
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 25;
	width: 26px;
	height: 26px;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.78);
	color: #ffffff;
	font-size: 16px;
	line-height: 1;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.slsp-mini-close:hover,
.slsp-mini-close:focus-visible {
	background: var(--slsp-accent, #e11d48);
	border-color: var(--slsp-accent, #e11d48);
	color: #ffffff;
	transform: scale(1.06);
	outline: none;
}

@keyframes slspMiniSlideUp {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.slsp-player-wrapper.slsp-is-mini .slsp-stage {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 340px;
	max-width: calc(100vw - 32px);
	z-index: 99990;
	aspect-ratio: var(--slsp-aspect-ratio, 16 / 9);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.12);
	animation: slspMiniSlideUp 0.22s ease;
}

.slsp-player-wrapper.slsp-is-mini .slsp-mini-close {
	display: inline-flex;
}

.slsp-player-wrapper.slsp-is-mini .slsp-top-bar {
	padding: 8px 40px 8px 10px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-live-badge {
	padding: 3px 8px;
	font-size: 10px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-stream-title {
	font-size: 11px;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.slsp-player-wrapper.slsp-is-mini .slsp-stage button.slsp-big-play {
	width: 40px;
	height: 40px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-stage button.slsp-big-play svg {
	width: 16px;
	height: 16px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-controls-bar {
	padding: 14px 8px 6px;
	background: linear-gradient(to top, rgba(10, 14, 23, 0.84) 0%, rgba(10, 14, 23, 0.28) 65%, transparent 100%);
}

.slsp-player-wrapper.slsp-is-mini .slsp-progress-wrap {
	margin-bottom: 4px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-controls-row,
.slsp-player-wrapper.slsp-is-mini .slsp-controls-left,
.slsp-player-wrapper.slsp-is-mini .slsp-controls-right {
	gap: 3px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-stage button.slsp-ctrl-btn {
	min-width: 26px;
	height: 26px;
	padding: 0 5px;
	border-radius: 6px;
	touch-action: manipulation;
}

.slsp-player-wrapper.slsp-is-mini .slsp-stage button.slsp-ctrl-btn svg {
	width: 14px;
	height: 14px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-live-pill {
	padding: 2px 7px;
	font-size: 10px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-pip-btn,
.slsp-player-wrapper.slsp-is-mini .slsp-quality-wrap,
.slsp-player-wrapper.slsp-is-mini .slsp-time-display {
	display: none;
}

.slsp-player-wrapper.slsp-is-mini .slsp-logo-overlay.slsp-logo-pos-top-right {
	padding: 10px 42px 10px 10px;
}

.slsp-player-wrapper.slsp-is-mini .slsp-logo-overlay.slsp-logo-pos-top-right .slsp-channel-logo {
	max-width: 78px;
	max-height: 28px;
}

@media (max-width: 600px) {
	.slsp-player-wrapper.slsp-is-mini .slsp-stage {
		width: 248px;
		right: 12px;
		bottom: 12px;
	}

	.slsp-player-wrapper.slsp-is-mini .slsp-stage button.slsp-big-play {
		width: 36px;
		height: 36px;
	}

	.slsp-player-wrapper.slsp-is-mini .slsp-stage button.slsp-big-play svg {
		width: 14px;
		height: 14px;
	}
}
