/*
 * Live darshan on temple pages (pages/temple-detail.php, js/temple-videos.js).
 * Kept in its own file on the live site; the laptop copy has the same rules in custom.css.
 */
.tl-live-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #e11d48;
	box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.5);
	animation: tl-live-pulse 1.8s ease-out infinite;
	vertical-align: middle;
}

@keyframes tl-live-pulse {
	0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.45); }
	70% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
	100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.tl-live-dot { animation: none; }
}

.tl-nav-live .tl-live-dot {
	margin-right: 6px;
}

.tl-live-section {
	margin: 8px 0 34px;
	padding: 18px;
	border: 1px solid var(--tl-line, #dde6f3);
	border-radius: 14px;
	background: linear-gradient(180deg, #fff7f8 0%, #ffffff 60%);
}

.tl-live-section__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.tl-live-section__head h2 {
	margin: 0;
}

.tl-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #e11d48;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.tl-live-badge .tl-live-dot {
	background: #fff;
	box-shadow: none;
	animation: none;
}

.tl-live-caption {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 10px 0 0;
	color: var(--tl-muted, #637083);
	font-size: 0.9rem;
}

.tl-live-caption strong {
	flex-basis: 100%;
	color: var(--tl-ink, #121827);
}

.tl-video-facade {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 10px;
	background: #121827;
}

.tl-video-facade img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tl-video-facade iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.tl-video-play {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	border: 0;
	background: linear-gradient(180deg, rgba(18, 24, 39, 0.05) 0%, rgba(18, 24, 39, 0.45) 100%);
	color: #fff;
	cursor: pointer;
}

.tl-video-play__icon {
	position: relative;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: rgba(18, 24, 39, 0.55);
	border: 2px solid rgba(255, 255, 255, 0.85);
	transition: transform 0.2s ease, background 0.2s ease;
}

.tl-video-play__icon::after {
	content: "";
	position: absolute;
	left: 24px;
	top: 18px;
	border-style: solid;
	border-width: 12px 0 12px 19px;
	border-color: transparent transparent transparent #fff;
}

.tl-video-facade--live .tl-video-play__icon {
	background: rgba(225, 29, 72, 0.9);
	border-color: #fff;
}

.tl-video-play:hover .tl-video-play__icon,
.tl-video-play:focus-visible .tl-video-play__icon {
	transform: scale(1.07);
	background: rgba(225, 29, 72, 0.9);
}

.tl-video-play__label {
	font-weight: 700;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.tl-video-type {
	position: absolute;
	left: 10px;
	top: 10px;
	padding: 2px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--tl-ink, #121827);
	font-size: 0.75rem;
	font-weight: 600;
	pointer-events: none;
}

.tl-video-facade.is-playing .tl-video-type {
	display: none;
}

.tl-video-title {
	margin: 10px 2px 0;
	font-weight: 600;
	color: var(--tl-ink, #121827);
	line-height: 1.4;
}

/* Live darshan: the player is found while a short message shows over the thumbnail. */
.tl-live-stage {
	position: absolute;
	inset: 0;
}


.tl-live-status {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px;
	background: rgba(18, 24, 39, 0.62);
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.tl-live-status[hidden],
.tl-live-note[hidden] {
	display: none;
}

.tl-live-spinner {
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tl-live-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.tl-live-spinner { animation-duration: 2.5s; }
}

.tl-live-retry {
	padding: 7px 18px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #121827;
	font-weight: 700;
	text-shadow: none;
	cursor: pointer;
}

.tl-live-retry:hover,
.tl-live-retry:focus-visible {
	background: #ffe4e8;
}

.tl-live-note {
	padding: 2px 10px;
	border-radius: 999px;
	background: #fff4e5;
	color: #8a4b00;
	font-weight: 600;
}

/* Live darshan when nothing is live: a stream about to start, or the latest recording. */
.tl-live-section--quiet {
	background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 60%);
}

.tl-live-badge--soon {
	background: #fff1c2;
	color: #7a4b00;
	letter-spacing: 0.02em;
}

.tl-live-badge--off {
	background: #eef2f7;
	color: #475569;
	letter-spacing: 0.02em;
}

.tl-live-meta[hidden] {
	display: none;
}

.tl-live-meta {
	color: var(--tl-muted, #637083);
}
