/* Church Live Stream — frontend styles
   Palette pulled from the supplied mockup: dark background, lime→blue accent gradient. */

.cls-app {
	--cls-bg: #131313;
	--cls-bg-low: #1c1b1b;
	--cls-bg-lowest: #0e0e0e;
	--cls-surface: #201f1f;
	--cls-surface-high: #282a2b;
	--cls-surface-highest: #333535;
	--cls-on-surface: #e5e2e1;
	--cls-on-surface-var: #bdc8d0;
	--cls-outline: #3e484f;
	--cls-primary: #4AA9D8;
	--cls-secondary: #4AA9D8;
	--cls-accent-grad: linear-gradient(90deg, #4AA9D8 0%, #2C7DA8 100%);
	--cls-radius: 0.75rem;

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: var(--cls-bg);
	color: var(--cls-on-surface);
	border-radius: var(--cls-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: clamp(480px, 78vh, 760px);
	width: 100%;
}

.cls-app .cls-svg-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

.cls-app * { box-sizing: border-box; }

/* Nuclear reset: strips every theme default (including hover/focus pink
   buttons) from any <button> inside the widget. Each .cls-* button class
   below re-applies its own intentional styling on top of this. */
.cls-app button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.cls-app button:hover,
.cls-app button:focus,
.cls-app button:active {
	background-image: none;
}

.cls-main {
	flex: 1;
	display: flex;
	flex-direction: row;
	min-height: 0;
}

/* ---------- Video section ---------- */
.cls-video-section {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: var(--cls-bg-lowest);
	min-width: 0;
}

.cls-video-container {
	position: relative;
	flex: 1;
	background: #000;
	min-height: 240px;
}

.cls-video-iframe {
	width: 100%;
	height: 100%;
	display: block;
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

.cls-video-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--cls-on-surface-var);
}

.cls-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	box-shadow: 0 4px 14px rgba(0,0,0,.45);
	z-index: 3;
}
.cls-badge-live { background: var(--cls-accent-grad); }
.cls-badge-previous {
	background: var(--cls-primary);
	color: #fff;
	border: none;
}
.cls-dot {
	width: 8px; height: 8px; border-radius: 50%; background: #fff;
	animation: cls-pulse 1.4s infinite;
}
@keyframes cls-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.cls-video-floating-actions {
	position: absolute;
	bottom: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	z-index: 3;
}
.cls-icon-btn {
	background: rgba(14,14,14,.78);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,.18);
	color: #fff;
	border-radius: 9999px;
	width: 40px;
	height: 40px;
	min-width: 40px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.cls-yt-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(14,14,14,.78);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,.18);
	color: #fff;
	border-radius: 9999px;
	height: 40px;
	padding: 0 18px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.cls-info-bar {
	padding: 16px;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.cls-eyebrow {
	display: block;
	color: var(--cls-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 4px;
}
.cls-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.cls-meta { margin: 0; color: var(--cls-on-surface-var); font-size: 14px; }

.cls-mobile-tabs { display: none; }

/* ---------- Sidebar ---------- */
.cls-sidebar {
	width: 380px;
	flex-shrink: 0;
	background: var(--cls-surface);
	border-left: 1px solid rgba(255,255,255,.06);
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.cls-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,.06); }
.cls-app button.cls-tab {
	flex: 1;
	padding: 14px 0;
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	border-bottom: 2px solid transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--cls-on-surface-var) !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}
.cls-app button.cls-tab.is-active {
	color: var(--cls-primary) !important;
	border-color: var(--cls-primary) !important;
}

.cls-panel { display: none; flex: 1; flex-direction: column; min-height: 0; }
.cls-panel.is-active { display: flex; }

/* Chat */
.cls-name-gate {
	position: absolute;
	inset: 0;
	background: rgba(14,14,14,.92);
	display: flex; align-items: center; justify-content: center;
	z-index: 5;
}
.cls-chat-embed-wrap { position: relative; flex: 1; }
.cls-chat-iframe { width: 100%; height: 100%; border: none; }
.cls-name-gate-box {
	text-align: center;
	padding: 24px;
	max-width: 280px;
}
.cls-name-gate-box .cls-svg-icon { color: var(--cls-primary); }
.cls-name-gate-box h3 { margin: 8px 0 4px; }
.cls-name-gate-box p { color: var(--cls-on-surface-var); font-size: 14px; margin: 0 0 16px; }
.cls-name-gate-box input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--cls-outline);
	background: var(--cls-bg-lowest);
	color: var(--cls-on-surface);
	margin-bottom: 12px;
}

/* shared chat-like layout (used by prayer room) */
.cls-chat-stream {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cls-msg {
	display: flex;
	flex-direction: column;
	padding: 10px;
	border-radius: 10px;
	background: var(--cls-surface-high);
	font-size: 14px;
}
.cls-msg.is-host { border-left: 3px solid var(--cls-primary); }
.cls-msg-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.cls-msg-name { font-weight: 700; font-size: 12px; color: var(--cls-primary); }
.cls-msg-time { font-size: 11px; color: var(--cls-on-surface-var); opacity: .6; }
.cls-host-pill {
	background: var(--cls-accent-grad);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 4px;
}
.cls-msg-text { color: var(--cls-on-surface-var); }
.cls-msg-actions { display: flex; gap: 8px; margin-top: 6px; }
.cls-msg-actions button {
	background: none; border: none; color: var(--cls-on-surface-var);
	font-size: 11px; cursor: pointer; text-decoration: underline;
}

.cls-chat-input-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid rgba(255,255,255,.06);
	background: var(--cls-surface-high);
}
.cls-chat-input-row input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--cls-outline);
	background: var(--cls-bg-lowest);
	color: var(--cls-on-surface);
}
.cls-input-with-send { position: relative; display: flex; }
.cls-send-btn {
	position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	background: none; border: none; color: var(--cls-primary); cursor: pointer;
	padding: 6px;
}

/* Prayer subtabs */
.cls-prayer-subtabs { display: flex; gap: 8px; padding: 12px; }
.cls-app button.cls-prayer-subtab {
	flex: 1;
	padding: 10px;
	border-radius: 10px !important;
	border: 1px solid var(--cls-outline) !important;
	background: var(--cls-bg-lowest) !important;
	background-image: none !important;
	color: var(--cls-on-surface-var) !important;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none !important;
}
.cls-app button.cls-prayer-subtab.is-active {
	background: var(--cls-accent-grad) !important;
	color: #fff !important;
	border-color: transparent !important;
}
.cls-prayer-sub { display: none; flex: 1; flex-direction: column; min-height: 0; padding: 0 12px 12px; }
.cls-prayer-sub.is-active { display: flex; }

/* Buttons */
.cls-btn-accent {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--cls-accent-grad);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 12px 16px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
}
.cls-full-width { width: 100%; }

/* Bible / Give placeholders */
.cls-bible-placeholder, .cls-give-placeholder {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 8px;
	padding: 24px;
}
.cls-bible-placeholder .cls-svg-icon,
.cls-give-placeholder .cls-svg-icon {
	color: var(--cls-secondary);
}
.cls-empty-note { color: var(--cls-on-surface-var); font-size: 12px; opacity: .7; }

/* Bottom nav (mobile) */
.cls-bottom-nav { display: none; }

/* Modal */
.cls-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.6);
	align-items: center;
	justify-content: center;
	z-index: 9999;
}
.cls-modal-overlay.is-open { display: flex; }
.cls-modal {
	background: #fff;
	color: #1c1b1b;
	border-radius: 16px;
	padding: 24px;
	width: 90%;
	max-width: 380px;
	position: relative;
}
.cls-modal h3 { margin-top: 0; }
.cls-modal label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.cls-modal input, .cls-modal textarea {
	width: 100%;
	margin-top: 6px;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-family: inherit;
}
.cls-modal-close {
	position: absolute; top: 12px; right: 16px;
	background: none; border: none; font-size: 22px; cursor: pointer; color: #777;
}
.cls-form-status { font-size: 13px; margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
	.cls-app { height: 100vh; max-height: none; border-radius: 0; }
	.cls-main { flex-direction: column; }
	.cls-sidebar { width: 100%; border-left: none; }
	.cls-tabs { display: none; }
	.cls-mobile-tabs { display: flex; overflow-x: auto; gap: 8px; padding: 8px 16px; background: var(--cls-bg-low); border-bottom: 1px solid rgba(255,255,255,.06); }
	.cls-app button.cls-mobile-tab {
		flex-shrink: 0; background: transparent !important; background-image: none !important; border: none !important;
		color: var(--cls-on-surface-var) !important; padding: 6px 10px; font-size: 12px; font-weight: 700;
		border-bottom: 2px solid transparent !important; border-radius: 0 !important; box-shadow: none !important;
	}
	.cls-app button.cls-mobile-tab.is-active { color: var(--cls-primary) !important; border-color: var(--cls-primary) !important; }
	.cls-bottom-nav {
		display: flex; justify-content: space-around; align-items: center;
		height: 64px; background: rgba(19,19,19,.9); backdrop-filter: blur(20px);
		border-top: 1px solid rgba(255,255,255,.06);
	}
	.cls-app button.cls-bottom-tab {
		background: transparent !important; background-image: none !important; border: none !important; box-shadow: none !important;
		color: var(--cls-on-surface-var) !important;
		display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; cursor: pointer;
	}
	.cls-app button.cls-bottom-tab.is-active { color: var(--cls-primary) !important; }
}
