/* AI Sázky – Betting Summary widget */

/* V řádkovém Elementor kontejneru se widget jinak smrští na šířku obsahu –
   karta má vyplnit dostupné místo ve sloupci. Jakmile si šířku nastavíš
   ručně v Elementoru (Pokročilé → Šířka), tohle ustoupí a platí tvoje hodnota. */
.elementor-widget-aisazky_betting_summary:not([class*="elementor-widget__width-"]) {
	flex-grow: 1;
	min-width: 0;
}

.elementor-widget-aisazky_betting_summary {
	min-width: 0;
}

.elementor-widget-aisazky_betting_summary > .elementor-widget-container {
	width: 100%;
}

.aisz-bs {
	--aisz-dim: 0.42;
	--aisz-hover-grow: 4px;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	background-color: #fff;
	border: 1px solid #f4f4f4;
	border-radius: 6px;
	padding: 22px 24px 22px 20px;
	color: #0a3835;
}

.aisz-bs *,
.aisz-bs *::before,
.aisz-bs *::after {
	box-sizing: border-box;
}

/* ---------- hlavička ---------- */

.aisz-bs__head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.aisz-bs__title {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 0.2px;
	line-height: 1.2;
	color: #0a3835;
}

.aisz-bs__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	color: #0a3835;
}

.aisz-bs__icon svg,
.aisz-bs__icon i {
	width: 100%;
	height: 100%;
	font-size: inherit;
	display: block;
}

/* ---------- tělo ---------- */

.aisz-bs__body {
	display: flex;
	width: 100%;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 28px;
}

.aisz-bs__body--column {
	flex-direction: column;
	align-items: center;
}

/* ---------- graf ---------- */

.aisz-bs__chart {
	position: relative;
	container-type: inline-size;
	flex: 0 1 auto;
	width: 100%;
	max-width: 248px;
	aspect-ratio: 1 / 1;
	min-width: 0;
}

.aisz-bs__svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.aisz-bs__seg {
	pointer-events: stroke;
	transition: stroke-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
		opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: default;
}

/* výchozí stav při zapnuté animaci: prstenec je „nenakreslený“.
   Bez JS se přes <noscript> vrací na finální hodnotu. */
.aisz-bs--animate .aisz-bs__seg {
	stroke-dasharray: 0 9999;
}

.aisz-bs.is-focused .aisz-bs__seg {
	opacity: var(--aisz-dim);
}

.aisz-bs.is-focused .aisz-bs__seg.is-active {
	opacity: 1;
}

.aisz-bs__seg.is-off {
	opacity: 0;
	pointer-events: none;
}

/* ---------- střed ---------- */

.aisz-bs__center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	pointer-events: none;
	padding: 18%;
}

.aisz-bs__center-value {
	font-size: 42px;
	font-weight: 500;
	line-height: 1.05;
	color: #0a3835;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.aisz-bs__center-label {
	margin-top: 4px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	color: #8e8e8e;
}

/* Text ve středu škáluje s průměrem grafu, aby nikdy nepřetekl přes prstenec.
   Poměry odpovídají předloze: 41.95% zabírá ~83 % vnitřního průměru. */
@supports (width: 1cqw) {
	.aisz-bs__center-value {
		font-size: 15.1cqw;
	}

	.aisz-bs__center-label {
		font-size: 5.6cqw;
	}
}

/* ---------- legenda ---------- */

.aisz-bs__legend {
	display: flex;
	flex-direction: column;
	gap: 20px;
	flex: 0 1 auto;
	min-width: 0;
}

.aisz-bs__body--column .aisz-bs__legend {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px 28px;
	margin-top: 20px;
}

/* Reset musí přebít styly tématu pro <button> (Hello Elementor / Elementor
   nasazují na tlačítka pozadí, padding i barvu textu). */
.aisz-bs .aisz-bs__legend-item,
.aisz-bs button.aisz-bs__legend-item {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	width: auto;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	text-shadow: none;
	text-transform: none !important;
	letter-spacing: normal;
	font: inherit;
	color: inherit;
	border-radius: 4px !important;
	transition: opacity 0.2s ease;
}

.aisz-bs button.aisz-bs__legend-item {
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.aisz-bs button.aisz-bs__legend-item:hover,
.aisz-bs button.aisz-bs__legend-item:focus,
.aisz-bs button.aisz-bs__legend-item:active {
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: inherit;
	transform: none;
}

.aisz-bs button.aisz-bs__legend-item:focus-visible {
	outline: 2px solid #54b593;
	outline-offset: 4px;
}

.aisz-bs__legend-item.is-off {
	opacity: 0.45;
}

.aisz-bs__legend-head {
	display: flex;
	align-items: center;
	gap: 8px;
}

.aisz-bs__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex: 0 0 auto;
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.aisz-bs__legend-item.is-hover .aisz-bs__dot {
	transform: scale(1.35);
}

.aisz-bs__legend-item.is-off .aisz-bs__dot {
	background-color: transparent !important;
	box-shadow: inset 0 0 0 2px currentColor;
	color: #b6c4c3;
}

.aisz-bs__legend-label {
	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;
	color: #3e6260;
}

.aisz-bs__legend-value {
	margin-top: 5px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	color: #0a3835;
	font-variant-numeric: tabular-nums;
}

/* ---------- tooltip ---------- */

.aisz-bs__tooltip {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 5;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -100%) translateY(-10px) scale(0.96);
	transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
	background: #0a3835;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	padding: 7px 10px;
	border-radius: 6px;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(10, 56, 53, 0.22);
}

.aisz-bs__tooltip.is-visible {
	opacity: 1;
	transform: translate(-50%, -100%) translateY(-14px) scale(1);
}

.aisz-bs__tooltip strong {
	font-weight: 600;
}

.aisz-bs__tooltip em {
	font-style: normal;
	opacity: 0.7;
}

/* ---------- prázdný stav ---------- */

.aisz-bs--empty {
	font-size: 14px;
	color: #8e8e8e;
}

/* ---------- responsivita ---------- */

@media (max-width: 767px) {
	.aisz-bs__body {
		flex-direction: column;
		align-items: center;
	}

	.aisz-bs__body .aisz-bs__legend {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 16px 24px;
		margin-top: 20px;
	}

	.aisz-bs__legend-item {
		align-items: center;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aisz-bs__seg,
	.aisz-bs__dot,
	.aisz-bs__tooltip,
	.aisz-bs__legend-item {
		transition-duration: 0.01ms !important;
	}
}
