/*
 * Live News Updates — Frontend styles
 * Original design system. Colors are driven by CSS variables so the
 * accent and badge colors can be customized from Settings -> Live News.
 */

.lnu-live-news {
	--lnu-accent: #c8102e;
	--lnu-badge: #c8102e;
	--lnu-text: #1a1a1a;
	--lnu-update-text: #1a1a1a;
	--lnu-muted: #6b6f76;
	--lnu-border: #e7e7ea;
	--lnu-surface: #ffffff;
	--lnu-surface-alt: #f7f7f9;
	--lnu-radius: 14px;
	--lnu-bg-image: none;

	direction: ltr;
	unicode-bidi: isolate;
	max-width: 760px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", "Hind Siliguri", Roboto, Helvetica, Arial, sans-serif;
	color: var(--lnu-text);
	line-height: 1.55;
	box-sizing: border-box;
}

.lnu-live-news *,
.lnu-live-news *::before,
.lnu-live-news *::after {
	box-sizing: inherit;
}

/* ---------- Header ---------- */

.lnu-header {
	background-image: var(--lnu-bg-image);
	background-size: cover;
	background-position: center;
	border-radius: var(--lnu-radius);
	padding: 20px;
	margin-bottom: 20px;
	background-color: var(--lnu-surface-alt);
}

.lnu-logo {
	max-height: 40px;
	width: auto;
	display: block;
	margin-bottom: 12px;
}

.lnu-badge-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.lnu-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	padding: 5px 12px;
	border-radius: 999px;
	color: #fff;
	background: var(--lnu-badge);
}

.lnu-live-badge--paused {
	background: #8a8f98;
}

.lnu-live-badge--ended {
	background: #3a3d42;
}

.lnu-live-badge .lnu-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	display: inline-block;
}

.lnu-live-badge--live .lnu-dot {
	animation: lnu-pulse 1.4s infinite;
}

@keyframes lnu-pulse {
	0% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.75); }
	100% { opacity: 1; transform: scale(1); }
}

.lnu-last-updated {
	font-size: 13px;
	color: var(--lnu-muted) !important;
}

.lnu-title {
	font-size: 1.6rem;
	line-height: 1.3;
	margin: 6px 0 8px;
	font-weight: 800;
	color: var(--lnu-text) !important;
}

.lnu-description {
	font-size: 1rem;
	color: var(--lnu-muted) !important;
	margin: 0 0 12px;
}

.lnu-featured-image {
	margin: 12px 0;
	border-radius: var(--lnu-radius);
	overflow: hidden;
}

.lnu-featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* ---------- Share row ---------- */

.lnu-share-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.lnu-share-btn {
	font-size: 13px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--lnu-border);
	background: var(--lnu-surface) !important;
	color: var(--lnu-text) !important;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.lnu-share-btn:hover {
	background: var(--lnu-surface-alt);
}
.lnu-share-btn:active {
	transform: scale(0.97);
}

/* ---------- Notification bar ---------- */

.lnu-notification-bar {
	position: sticky;
	top: 8px;
	z-index: 5;
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}

.lnu-notification-bar[hidden] {
	display: none;
}

.lnu-load-new-btn {
	background: var(--lnu-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
	animation: lnu-bounce-in 0.25s ease;
}

@keyframes lnu-bounce-in {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ---------- Updates list ---------- */

.lnu-updates-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lnu-update {
	position: relative;
	padding: 18px 0 18px 24px;
	border-inline-start: 3px solid var(--lnu-border);
	margin-bottom: 4px;
}

.lnu-update::before {
	content: "";
	position: absolute;
	inset-inline-start: -7px;
	top: 24px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--lnu-accent);
	border: 2px solid var(--lnu-surface);
}

.lnu-update--breaking {
	border-inline-start-color: var(--lnu-accent);
	background: color-mix(in srgb, var(--lnu-accent) 6%, transparent);
	border-radius: 10px;
	padding-inline: 16px;
}

.lnu-update--pinned {
	background: var(--lnu-surface-alt);
	border-radius: 10px;
	padding-inline: 16px;
}

.lnu-update-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.lnu-update-time {
	font-size: 13px;
	font-weight: 700;
	color: var(--lnu-muted) !important;
}

.lnu-tag {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 5px;
	color: #fff;
}

.lnu-tag--breaking {
	background: var(--lnu-accent);
}

.lnu-tag--pinned {
	background: #2b2f38;
}

.lnu-update-headline {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.4;
	color: var(--lnu-update-text) !important;
}

.lnu-update-content,
.lnu-update-content p,
.lnu-update-content span,
.lnu-update-content li,
.lnu-update-content strong,
.lnu-update-content em {
	font-size: 0.98rem;
	color: var(--lnu-update-text) !important;
}

.lnu-update-content p:first-child {
	margin-top: 0;
}
.lnu-update-content p:last-child {
	margin-bottom: 0;
}

.lnu-update-image {
	margin-top: 10px;
	border-radius: 10px;
	overflow: hidden;
}
.lnu-update-image img {
	width: 100%;
	height: auto;
	display: block;
}

.lnu-update-video,
.lnu-update-source {
	margin-top: 8px;
	font-size: 14px;
}

.lnu-update-video a,
.lnu-update-source a {
	color: var(--lnu-accent);
	text-decoration: none;
	font-weight: 600;
}
.lnu-update-video a:hover,
.lnu-update-source a:hover {
	text-decoration: underline;
}

/* Newly-inserted update highlight animation */
.lnu-update--new {
	animation: lnu-highlight 2.4s ease;
}

@keyframes lnu-highlight {
	0% { background-color: color-mix(in srgb, var(--lnu-accent) 18%, transparent); }
	100% { background-color: transparent; }
}

.lnu-no-updates {
	text-align: center;
	color: var(--lnu-muted) !important;
	padding: 30px 0;
}

/* ---------- Pagination ---------- */

.lnu-pagination {
	text-align: center;
	margin-top: 18px;
}

.lnu-load-more-btn {
	background: var(--lnu-surface-alt) !important;
	border: 1px solid var(--lnu-border);
	color: var(--lnu-text) !important;
	font-weight: 700;
	padding: 10px 22px;
	border-radius: 999px;
	cursor: pointer;
}

.lnu-load-more-btn[hidden] {
	display: none;
}

.lnu-load-more-btn:hover {
	background: var(--lnu-border);
}

/* ---------- Toast ---------- */

.lnu-toast {
	position: fixed;
	inset-inline: 0;
	bottom: 20px;
	display: flex;
	justify-content: center;
	pointer-events: none;
	z-index: 9999;
}

.lnu-toast-inner {
	background: #1a1a1a;
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
	.lnu-live-news {
		padding-inline: 12px;
	}
	.lnu-title {
		font-size: 1.3rem;
	}
	.lnu-header {
		padding: 16px;
	}
	.lnu-update {
		padding-inline-start: 18px;
	}
}

/* ---------- RTL readiness ---------- */

[dir="rtl"] .lnu-live-news {
	direction: rtl;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.lnu-live-badge--live .lnu-dot,
	.lnu-update--new,
	.lnu-load-new-btn {
		animation: none;
	}
}

/* ==========================================================
 * [live_news_list] — horizontal live-news ticker
 * ========================================================== */

.lnu-list-wrap {
	--lnu-accent: #c8102e;
	--lnu-badge: #c8102e;
	--lnu-text: #1a1a1a;
	--lnu-muted: #6b6f76;
	--lnu-border: #e7e7ea;
	--lnu-surface: #ffffff;
	--lnu-surface-alt: #f7f7f9;

	direction: ltr;
	unicode-bidi: isolate;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", "Hind Siliguri", Roboto, Helvetica, Arial, sans-serif;
	color: var(--lnu-text);
	margin: 0 0 24px;
	box-sizing: border-box;
}

.lnu-list-wrap *,
.lnu-list-wrap *::before,
.lnu-list-wrap *::after {
	box-sizing: inherit;
}

.lnu-list-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.lnu-list-live-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--lnu-badge);
	display: inline-block;
	animation: lnu-pulse 1.4s infinite;
	flex-shrink: 0;
}

.lnu-list-title {
	font-size: 1.15rem;
	font-weight: 800;
	margin: 0;
}

.lnu-list-scroll {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 8px;
	scrollbar-width: thin;
}

.lnu-list-scroll::-webkit-scrollbar {
	height: 6px;
}
.lnu-list-scroll::-webkit-scrollbar-thumb {
	background: var(--lnu-border);
	border-radius: 999px;
}

.lnu-list-card {
	scroll-snap-align: start;
	flex: 0 0 auto;
	width: 240px;
	background: var(--lnu-surface) !important;
	border: 1px solid var(--lnu-border);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none !important;
	color: var(--lnu-text) !important;
	display: flex;
	flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	position: relative;
}

.lnu-list-card:hover,
.lnu-list-card:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.lnu-list-card-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--lnu-surface-alt);
}

.lnu-list-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lnu-list-status {
	position: absolute;
	top: 8px;
	inset-inline-start: 8px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #fff;
	background: var(--lnu-badge);
	padding: 3px 8px;
	border-radius: 999px;
}

.lnu-list-status--paused {
	background: #8a8f98;
}
.lnu-list-status--ended {
	background: #3a3d42;
}

.lnu-list-status--floating {
	position: static;
	display: inline-block;
	margin: 10px 12px 0;
	align-self: flex-start;
}

.lnu-list-card-body {
	padding: 10px 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.lnu-list-card-time {
	font-size: 12px;
	font-weight: 700;
	color: var(--lnu-muted) !important;
}

.lnu-list-card-title {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--lnu-text) !important;
}

.lnu-list-card-excerpt {
	font-size: 0.85rem;
	color: var(--lnu-muted) !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

[dir="rtl"] .lnu-list-wrap {
	direction: rtl;
}

@media (max-width: 480px) {
	.lnu-list-card {
		width: 200px;
	}
}
