/*
 * CSL Sports Ticker styles.
 *
 * The ticker is a fixed bottom bar that scrolls horizontally. All styles are
 * namespaced under .csl-ticker-root so we don't collide with the theme.
 */

.csl-ticker-root {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483000; /* above most sticky nav / BuddyBoss chat bars */
	pointer-events: none; /* children re-enable */
}

.csl-ticker-root *,
.csl-ticker-root *::before,
.csl-ticker-root *::after {
	box-sizing: border-box;
}

.csl-ticker {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 42px;
	background: linear-gradient(180deg, #0b1220 0%, #080358 100%);
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.2;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
	pointer-events: auto;
	overflow: hidden;
}

.csl-ticker[hidden] {
	display: none;
}

/* Left brand label */
.csl-ticker__brand {
	flex: 0 0 auto;
	background: #F5C518;
	color: #080358;
	padding: 0 14px;
	display: flex;
	align-items: center;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	font-size: 12px;
	white-space: nowrap;
	border-right: 2px solid #080358;
}

/* Scrolling track */
.csl-ticker__track-wrap {
	flex: 1 1 auto;
	overflow: hidden;
	position: relative;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
	        mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}

.csl-ticker__track {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	height: 100%;
	width: max-content;
	animation: csl-ticker-scroll linear infinite;
	will-change: transform;
}

.csl-ticker:hover .csl-ticker__track,
.csl-ticker:focus-within .csl-ticker__track {
	animation-play-state: paused;
}

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

@media (prefers-reduced-motion: reduce) {
	.csl-ticker__track {
		animation: none;
	}
	.csl-ticker__track-wrap {
		overflow-x: auto;
	}
}

/* Individual items */
.csl-ticker__item {
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	border-right: 1px solid rgba(255, 255, 255, 0.12);
	color: inherit;
	text-decoration: none;
}

.csl-ticker__item:hover,
.csl-ticker__item:focus {
	color: #F5C518;
	outline: none;
}

.csl-ticker__badge {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 2px 6px;
	border-radius: 3px;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.15);
}

.csl-ticker__badge--LIVE {
	background: #d92d20;
	color: #fff;
	animation: csl-pulse 1.6s ease-in-out infinite;
}

@keyframes csl-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.6; }
}

.csl-ticker__badge--FINAL {
	background: #4b5563;
	color: #fff;
}

.csl-ticker__badge--UPCOMING {
	background: #0ea5e9;
	color: #fff;
}

.csl-ticker__badge--NEWS {
	background: #F5C518;
	color: #080358;
}

/* Right-side controls */
.csl-ticker__controls {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.csl-ticker__btn {
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	padding: 0 12px;
	height: 100%;
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease;
}

.csl-ticker__btn:hover,
.csl-ticker__btn:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	outline: none;
}

.csl-ticker__btn:focus-visible {
	box-shadow: inset 0 0 0 2px #F5C518;
}

.csl-ticker__btn-icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
}

/* Empty / loading state */
.csl-ticker__empty {
	padding: 0 18px;
	display: flex;
	align-items: center;
	color: rgba(255, 255, 255, 0.7);
	font-style: italic;
}

/* Reopen tab when dismissed */
.csl-ticker-reopen {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 0;
	z-index: 2147483000;
	background: #F5C518;
	color: #080358;
	border: 0;
	border-radius: 6px 6px 0 0;
	padding: 6px 14px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
	pointer-events: auto;
}

.csl-ticker-reopen[hidden] {
	display: none;
}

.csl-ticker-reopen:hover,
.csl-ticker-reopen:focus-visible {
	background: #ffd84d;
	outline: none;
}

/* Small screen tweaks */
@media (max-width: 600px) {
	.csl-ticker {
		height: 38px;
		font-size: 13px;
	}
	.csl-ticker__brand {
		padding: 0 10px;
		font-size: 11px;
	}
	.csl-ticker__item {
		padding: 0 12px;
	}
}
