/* ==========================================================================
   News Ticker Pro — frontend styles
   Scoped to .ntp-ticker. Colours/sizing come from per-instance CSS variables.
   ========================================================================== */

.ntp-ticker {
	--ntp-bar: #0B1F3A;
	--ntp-text: #ffffff;
	--ntp-hover: #C4972F;
	--ntp-label-bg: #C4972F;
	--ntp-label-text: #0B1F3A;
	--ntp-blink: #E23636;
	--ntp-font: 15px;
	--ntp-height: 46px;
	--ntp-radius: 0px;

	display: flex;
	align-items: stretch;
	width: 100%;
	height: var(--ntp-height);
	background: var(--ntp-bar);
	border-radius: var(--ntp-radius);
	overflow: hidden;
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1;
}

.ntp-ticker * {
	box-sizing: border-box;
}

/* Left label ------------------------------------------------------------- */
.ntp-ticker .ntp-label {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0 18px;
	background: var(--ntp-label-bg);
	color: var(--ntp-label-text);
	font-size: var(--ntp-font);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
	position: relative;
	z-index: 2;
}

/* Small arrow notch on the label */
.ntp-ticker .ntp-label::after {
	content: "";
	position: absolute;
	right: -9px;
	top: 50%;
	transform: translateY(-50%);
	border-style: solid;
	border-width: 8px 0 8px 9px;
	border-color: transparent transparent transparent var(--ntp-label-bg);
}

/* Scrolling viewport ----------------------------------------------------- */
.ntp-ticker .ntp-viewport {
	position: relative;
	flex: 1 1 auto;
	overflow: hidden;
	display: flex;
	align-items: center;
}

.ntp-ticker .ntp-track {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	white-space: nowrap;
	will-change: transform;
	animation-name: ntp-scroll;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: 30s; /* overridden inline by JS */
}

.ntp-ticker.ntp-dir-right .ntp-track {
	animation-direction: reverse;
}

.ntp-ticker .ntp-set {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	white-space: nowrap;
}

/* Pause on hover --------------------------------------------------------- */
.ntp-ticker.ntp-pause .ntp-viewport:hover .ntp-track {
	animation-play-state: paused;
}

/* Items ------------------------------------------------------------------ */
.ntp-ticker .ntp-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 20px;
	color: var(--ntp-text);
	font-size: var(--ntp-font);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.ntp-ticker a.ntp-item {
	transition: color .2s ease;
}

.ntp-ticker a.ntp-item:hover,
.ntp-ticker a.ntp-item:focus {
	color: var(--ntp-hover);
	text-decoration: none;
}

.ntp-ticker a.ntp-item:hover .ntp-text {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ntp-ticker .ntp-sep {
	color: var(--ntp-text);
	opacity: .45;
	font-size: var(--ntp-font);
	padding: 0 2px;
	white-space: nowrap;
}

/* Blink markers ---------------------------------------------------------- */
.ntp-ticker .ntp-blink {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	animation: ntp-blink 1s steps(2, start) infinite;
}

.ntp-ticker .ntp-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ntp-blink);
}

.ntp-ticker .ntp-badge {
	padding: 2px 7px;
	border-radius: 3px;
	background: var(--ntp-blink);
	color: #fff;
	font-size: calc(var(--ntp-font) - 4px);
	font-weight: 800;
	letter-spacing: .05em;
	line-height: 1.2;
}

.ntp-ticker .ntp-bell {
	width: 14px;
	height: 14px;
	color: var(--ntp-blink);
	background-color: currentColor;
	-webkit-mask: no-repeat center / contain;
	mask: no-repeat center / contain;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11c0-3.07-1.63-5.64-4.5-6.32V4a1.5 1.5 0 0 0-3 0v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11c0-3.07-1.63-5.64-4.5-6.32V4a1.5 1.5 0 0 0-3 0v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z'/%3E%3C/svg%3E");
}

@keyframes ntp-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@keyframes ntp-blink {
	0%, 100% { opacity: 1; }
	50%      { opacity: .15; }
}

/* Accessibility: respect reduced motion --------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.ntp-ticker .ntp-track {
		animation: none;
		transform: none;
	}
	.ntp-ticker .ntp-blink {
		animation: none;
	}
	.ntp-ticker .ntp-set[aria-hidden="true"] {
		display: none;
	}
	.ntp-ticker .ntp-viewport {
		overflow-x: auto;
	}
}

/* Mobile tweak */
@media (max-width: 600px) {
	.ntp-ticker .ntp-label {
		padding: 0 12px;
	}
	.ntp-ticker .ntp-item {
		padding: 0 14px;
	}
}
