/* ═══════════════════════════════════════════════════════════════
   IceMan Live Stream — Frontend Styles
   Standalone dark gaming aesthetic, works with any theme.
   ═══════════════════════════════════════════════════════════════ */

/* ── Container ── */
.iceman-livestream-container {
	position: relative;
	background: #12121a;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	overflow: hidden;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #ffffff;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ── Loading state ── */
.iceman-livestream-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	background: #0a0a0f;
}

.iceman-livestream-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: #00b4ff;
	border-radius: 50%;
	animation: iceman-spin 0.8s linear infinite;
}

@keyframes iceman-spin {
	to { transform: rotate(360deg); }
}

/* ── Live state ── */
.iceman-livestream-live {
	display: none;
}

.iceman-livestream-live.is-active {
	display: block;
}

/* Header bar */
.iceman-livestream-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
	border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

/* LIVE badge */
.iceman-livestream-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ef4444;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 4px;
	line-height: 1;
}

.iceman-livestream-badge-dot {
	width: 8px;
	height: 8px;
	background: #ffffff;
	border-radius: 50%;
	animation: iceman-pulse 1.5s ease-in-out infinite;
}

@keyframes iceman-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(0.8); }
}

/* Stream title */
.iceman-livestream-title {
	flex: 1;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #ffffff;
	margin: 0;
}

/* Platform label */
.iceman-livestream-platform {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
	text-transform: capitalize;
}

/* Viewer count */
.iceman-livestream-viewers {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	font-weight: 500;
	white-space: nowrap;
}

.iceman-livestream-viewers::before {
	content: '👁 ';
}

/* Embed wrapper — responsive 16:9 */
.iceman-livestream-embed-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	background: #000000;
}

.iceman-livestream-embed-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Player container */
.iceman-livestream-player {
	width: 100%;
}

/* ── Offline state ── */
.iceman-livestream-offline {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 48px 24px;
	background: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
	min-height: 200px;
}

.iceman-livestream-offline.is-hidden {
	display: none;
}

/* Offline icon */
.iceman-livestream-offline-icon {
	width: 64px;
	height: 64px;
	margin-bottom: 20px;
	opacity: 0.3;
}

.iceman-livestream-offline-icon svg {
	width: 100%;
	height: 100%;
	fill: #a1a1aa;
}

/* Offline text */
.iceman-livestream-offline-text {
	font-size: 16px;
	color: #a1a1aa;
	margin: 0 0 24px;
	max-width: 400px;
	line-height: 1.6;
}

/* Social links */
.iceman-livestream-offline-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.iceman-livestream-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.25s ease;
	border: 1px solid transparent;
}

.iceman-livestream-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.iceman-livestream-link-twitch {
	background: rgba(145, 70, 255, 0.15);
	color: #bf94ff;
	border-color: rgba(145, 70, 255, 0.3);
}

.iceman-livestream-link-twitch:hover {
	background: rgba(145, 70, 255, 0.25);
	color: #d4b3ff;
}

.iceman-livestream-link-youtube {
	background: rgba(255, 0, 0, 0.12);
	color: #ff6b6b;
	border-color: rgba(255, 0, 0, 0.25);
}

.iceman-livestream-link-youtube:hover {
	background: rgba(255, 0, 0, 0.2);
	color: #ff8a8a;
}

.iceman-livestream-link svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* ── Transitions ── */
.iceman-livestream-fade-enter {
	opacity: 0;
	transition: opacity 0.4s ease;
}

.iceman-livestream-fade-enter-active {
	opacity: 1;
}

.iceman-livestream-fade-exit {
	opacity: 1;
	transition: opacity 0.4s ease;
}

.iceman-livestream-fade-exit-active {
	opacity: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.iceman-livestream-header {
		flex-wrap: wrap;
		gap: 8px;
		padding: 10px 12px;
	}

	.iceman-livestream-title {
		order: 3;
		width: 100%;
		white-space: normal;
		font-size: 13px;
	}

	.iceman-livestream-offline {
		padding: 32px 16px;
	}

	.iceman-livestream-offline-text {
		font-size: 14px;
	}

	.iceman-livestream-link {
		padding: 8px 16px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.iceman-livestream-offline-links {
		flex-direction: column;
		width: 100%;
	}

	.iceman-livestream-link {
		justify-content: center;
	}
}

/* ── Admin-specific (scoped to settings page) ── */
.iceman-livestream-admin-status {
	font-style: italic;
	margin-left: 8px;
}

.iceman-livestream-admin-loading {
	color: #666;
}

.iceman-livestream-admin-success {
	color: #00a32a;
}

.iceman-livestream-admin-error {
	color: #d63638;
}

.iceman-livestream-test-result {
	margin-top: 10px;
	padding: 12px;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	border-radius: 2px;
}
