/**
 * IG SML Sports — live ticker + shared live-score node styles.
 *
 * Palette: dark #203342, accent #ffd200, live green #0d8360.
 * Lightweight, no external deps. The strip stays invisible while empty.
 */

/* --------------------------------------------------------------------------
 * Ticker strip
 * ---------------------------------------------------------------------- */
.sml-ticker {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 40;
	display: block;
	width: 100%;
	background: #203342;
	color: #fff;
	font-size: 13px;
	line-height: 1.3;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #0d8360 #203342;
	white-space: nowrap;
}

/* Safety: never render an empty strip. */
.sml-ticker:empty {
	display: none;
}

.sml-ticker::-webkit-scrollbar {
	height: 4px;
}

.sml-ticker::-webkit-scrollbar-thumb {
	background: #0d8360;
}

.sml-ticker-track {
	display: inline-flex;
	align-items: stretch;
	min-width: 100%;
}

/* --------------------------------------------------------------------------
 * Ticker item (chip)
 * ---------------------------------------------------------------------- */
.sml-ticker-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	color: #fff;
	text-decoration: none;
	border-right: 1px solid rgba( 255, 255, 255, 0.08 );
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.sml-ticker-item:last-child {
	border-right: 0;
}

.sml-ticker-item:hover,
.sml-ticker-item:focus {
	background: rgba( 255, 255, 255, 0.06 );
	color: #fff;
}

.sml-ticker-league {
	color: rgba( 255, 255, 255, 0.55 );
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.sml-ticker-teams {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sml-ticker-team {
	font-weight: 500;
}

.sml-ticker-score {
	font-weight: 700;
	color: #ffd200;
	font-variant-numeric: tabular-nums;
}

.sml-ticker-score .igsml-hs,
.sml-ticker-score .igsml-as {
	color: #ffd200;
}

/* --------------------------------------------------------------------------
 * Live state badge (shared live-contract nodes)
 * ---------------------------------------------------------------------- */
.igsml-state {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
}

.igsml-min {
	color: #ffd200;
	font-weight: 700;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.igsml-dot {
	display: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #e23636;
}

/* Pulsing red dot only while a fixture is in play. */
.igsml-state.is-live .igsml-dot,
.sml-ticker-item.is-live .igsml-dot {
	display: inline-block;
	animation: igsml-pulse 1.4s ease-in-out infinite;
}

.igsml-state.is-live .igsml-min,
.sml-ticker-item.is-live .igsml-min {
	color: #ff5959;
}

.sml-ticker-item.is-finished .igsml-min {
	color: rgba( 255, 255, 255, 0.55 );
}

.sml-ticker-item.is-finished .sml-ticker-score {
	color: #fff;
}

.sml-ticker-item.is-finished .sml-ticker-score .igsml-hs,
.sml-ticker-item.is-finished .sml-ticker-score .igsml-as {
	color: #fff;
}

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

@media ( prefers-reduced-motion: reduce ) {
	.igsml-state.is-live .igsml-dot,
	.sml-ticker-item.is-live .igsml-dot {
		animation: none;
	}
}

/* --------------------------------------------------------------------------
 * Indicative-market odds caption ("kursy rynkowe")
 *
 * Rendered under the live SML 1X2 prices in the CTA blocks. The number is a
 * representative market-best price; the affiliate link/logo is ours.
 * ---------------------------------------------------------------------- */
.igsml-odds-note {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	text-align: center;
	margin-top: 4px;
}

/* Inside a flex .bhi-quick-odds row, force the caption onto its own line. */
.bhi-quick-odds .igsml-odds-note {
	display: block;
	width: 100%;
}

/* --------------------------------------------------------------------------
 * Crest / logo helper (igsml_crest_img)
 * ---------------------------------------------------------------------- */
.igsml-crest {
	width: 20px;
	height: 20px;
	object-fit: contain;
	vertical-align: middle;
	display: inline-block;
}

/* --------------------------------------------------------------------------
 * Match xG node in the intro-compare-box (igsml_sc_compare_introbox)
 * ---------------------------------------------------------------------- */
.icb-c-xg {
	text-align: center;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.4;
}

.icb-c-xg-label {
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: #888;
}

.icb-c-xg-val {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
	color: #203342;
}

/* --------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */
@media ( max-width: 600px ) {
	.sml-ticker {
		font-size: 12px;
	}

	.sml-ticker-item {
		padding: 7px 11px;
		gap: 6px;
	}

	.sml-ticker-league {
		display: none;
	}
}
