/* DLX Breaking News */

.dlxbn {
	--dlxbn-bg: #0f1115;
	--dlxbn-fg: #ffffff;
	--dlxbn-accent: #e0263c;
	--dlxbn-h: 46px;

	display: flex;
	align-items: stretch;
	width: 100%;
	background: var(--dlxbn-bg);
	color: var(--dlxbn-fg);
	font-size: 15px;
	line-height: 1.3;
	overflow: hidden;
}

.dlxbn--sticky {
	position: sticky;
	top: 0;
	z-index: 9999;
}

/* Label */
.dlxbn__label {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 0 16px;
	background: var(--dlxbn-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.dlxbn__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	animation: dlxbn-pulse 1.4s ease-in-out infinite;
}

@keyframes dlxbn-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

/* Viewport */
.dlxbn__viewport {
	position: relative;
	flex: 1 1 auto;
	height: var(--dlxbn-h);
	overflow: hidden;
}

.dlxbn__item a {
	color: inherit;
	text-decoration: none;
}

.dlxbn__item a:hover,
.dlxbn__item a:focus {
	text-decoration: underline;
}

.dlxbn__item a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.dlxbn__time {
	margin-left: 10px;
	font-size: 12px;
	opacity: 0.6;
	white-space: nowrap;
}

/* One headline at a time — the queue modes */
.dlxbn--slide .dlxbn__track,
.dlxbn--fade .dlxbn__track {
	height: 100%;
}

.dlxbn--slide .dlxbn__item,
.dlxbn--fade .dlxbn__item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	padding: 0 16px;
	opacity: 0;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.dlxbn--slide .dlxbn__item.is-active,
.dlxbn--fade .dlxbn__item.is-active {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

/* Enters from the right, leaves to the left. */
.dlxbn--slide .dlxbn__item {
	transform: translateX(28px);
}

.dlxbn--slide .dlxbn__item.is-out {
	opacity: 0;
	transform: translateX(-28px);
}

/* Rises up from below, leaves through the top. */
.dlxbn--fade .dlxbn__item {
	transform: translateY(100%);
}

.dlxbn--fade .dlxbn__item.is-out {
	opacity: 0;
	transform: translateY(-100%);
}

/* Continuous scroll — the TV style ticker */
.dlxbn--scroll .dlxbn__viewport {
	/* Headlines melt in and out at the edges instead of being chopped off. */
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

.dlxbn--scroll .dlxbn__track {
	display: flex;
	align-items: center;
	width: max-content;
	height: 100%;
	white-space: nowrap;
	will-change: transform;
	backface-visibility: hidden;
	animation-name: dlxbn-marquee;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: 30s; /* JS overwrites this from the real pixel width. */
}

/* Nothing moves until JS has measured the row, so there is no jump on load. */
.dlxbn--scroll .dlxbn__track:not(.is-running) {
	animation-play-state: paused;
}

.dlxbn--scroll .dlxbn__item {
	position: relative;
	display: flex;
	align-items: center;
	padding: 0 26px;
	flex: 0 0 auto;
}

.dlxbn--scroll .dlxbn__item::after {
	content: "";
	position: absolute;
	right: -3px;
	top: 50%;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--dlxbn-accent);
	opacity: 0.85;
	transform: translateY(-50%);
}

.dlxbn.is-paused .dlxbn__track {
	animation-play-state: paused;
}

@keyframes dlxbn-marquee {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(calc(var(--dlxbn-shift, 100%) * -1), 0, 0); }
}

/* Pause button */
.dlxbn__toggle {
	flex: 0 0 auto;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s ease;
}

.dlxbn__toggle:hover,
.dlxbn__toggle:focus-visible {
	opacity: 1;
}

.dlxbn__toggle span {
	width: 3px;
	height: 12px;
	background: currentColor;
	transition: all 0.15s ease;
}

.dlxbn__toggle[aria-pressed="true"] span:first-child {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent currentColor;
	background: transparent;
}

.dlxbn__toggle[aria-pressed="true"] span:last-child {
	display: none;
}

@media (max-width: 600px) {
	.dlxbn { font-size: 14px; --dlxbn-h: 42px; }
	.dlxbn__label { padding: 0 12px; font-size: 11px; }
	.dlxbn__toggle { width: 32px; }
	.dlxbn__time { display: none; }
}

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

	/* No travelling — the row just sits still and can be scrolled by hand. */
	.dlxbn--scroll .dlxbn__track { animation: none; transform: none; }
	.dlxbn--scroll .dlxbn__viewport { overflow-x: auto; }

	/* Headlines still take turns — they just stop travelling. */
	.dlxbn--slide .dlxbn__item,
	.dlxbn--fade .dlxbn__item {
		transform: none;
		transition: opacity 0.3s ease;
	}

	.dlxbn--slide .dlxbn__item.is-out,
	.dlxbn--fade .dlxbn__item.is-out {
		transform: none;
	}
}
