/**
 * Battle Zone Turnaje – veřejné pódium žebříčku (TOP 3) + animace.
 * Scopováno pod .bz-tur, prefix bz-. ŽÁDNÉ fonty (Barlow/Inter má web).
 * Barvy dědí z proměnných definovaných v turnaje.css na .bz-tur; pódium
 * přidává vlastní proměnné pro stupně (zlato/stříbro/bronz).
 */

.bz-tur .bz-podium {
	--bz-gold: #ffcf40;
	--bz-silver: #c8ccd6;
	--bz-bronze: #cd7f45;
	--bz-podium-anim: 780ms;
	--bz-podium-ease: cubic-bezier(.2, .8, .2, 1);

	position: relative;
	overflow: hidden;
	margin: 40px 0 28px;
	padding: 40px 28px 48px;
	border-radius: 18px;
	background:
		radial-gradient(120% 90% at 50% -10%, rgba(255, 0, 255, .12), transparent 60%),
		linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
	border: 1px solid rgba(255, 0, 255, .28);
	box-shadow: 0 0 60px rgba(255, 0, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* Jemná pulzující záře na pozadí karty. */
.bz-tur .bz-podium__glow {
	position: absolute;
	inset: -40% 20% auto 20%;
	height: 340px;
	background: radial-gradient(50% 50% at 50% 50%, rgba(255, 0, 255, .35), transparent 70%);
	filter: blur(40px);
	opacity: .5;
	pointer-events: none;
	z-index: 0;
}

/* --- Hlavička pódia --- */
.bz-tur .bz-podium__head {
	position: relative;
	z-index: 1;
	text-align: center;
	margin-bottom: 34px;
}

.bz-tur .bz-podium__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: "Barlow", sans-serif;
	font-weight: 700;
	font-size: .74rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--bz-accent);
}

.bz-tur .bz-podium__eyebrow .bz-ico {
	width: 16px;
	height: 16px;
}

.bz-tur .bz-podium__title {
	font-family: "Barlow", sans-serif;
	font-weight: 800;
	font-size: clamp(2.4rem, 6vw, 3.6rem);
	line-height: 1;
	letter-spacing: -.01em;
	color: var(--bz-heading);
	margin: 12px 0 14px;
	text-shadow: 0 0 30px rgba(255, 0, 255, .35);
}

.bz-tur .bz-podium__badge {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 999px;
	font-family: "Barlow", sans-serif;
	font-weight: 700;
	font-size: .72rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bz-green);
	background: rgba(57, 255, 136, .1);
	border: 1px solid rgba(57, 255, 136, .45);
}

/* --- Stage pódia --- */
.bz-tur .bz-podium__stage {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: clamp(8px, 2.5vw, 22px);
	max-width: 760px;
	margin: 0 auto;
}

.bz-tur .bz-podium__col {
	flex: 1 1 0;
	max-width: 230px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Vizuální rozmístění: 1. místo uprostřed, 2. vlevo, 3. vpravo. */
.bz-tur .bz-podium__col--1 { order: 2; }
.bz-tur .bz-podium__col--2 { order: 1; }
.bz-tur .bz-podium__col--3 { order: 3; }

/* --- Karta týmu nad stupněm --- */
.bz-tur .bz-podium__card {
	width: 100%;
	text-align: center;
	padding: 0 6px 16px;
}

.bz-tur .bz-podium__medal {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin-bottom: 10px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	border: 2px solid currentColor;
	box-shadow: 0 0 24px -4px currentColor;
}

.bz-tur .bz-podium__medal .bz-ico {
	width: 30px;
	height: 30px;
}

.bz-tur .bz-podium__medalrank {
	position: absolute;
	right: -4px;
	bottom: -4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #000;
	border: 2px solid currentColor;
	color: #fff;
	font-family: "Barlow", sans-serif;
	font-weight: 800;
	font-size: .72rem;
	line-height: 18px;
	text-align: center;
}

.bz-tur .bz-podium__team {
	display: block;
	font-family: "Barlow", sans-serif;
	font-weight: 800;
	font-size: clamp(.95rem, 2.2vw, 1.15rem);
	color: var(--bz-heading);
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bz-tur .bz-podium__points {
	display: block;
	margin-top: 6px;
	font-family: "Barlow", sans-serif;
	font-weight: 800;
}

.bz-tur .bz-podium__pointsnum {
	font-size: clamp(1.5rem, 4vw, 2.1rem);
	color: currentColor;
	text-shadow: 0 0 18px currentColor;
}

.bz-tur .bz-podium__pointslabel {
	font-size: .9rem;
	color: var(--bz-muted);
	margin-left: 3px;
}

.bz-tur .bz-podium__meta {
	display: block;
	margin-top: 4px;
	font-family: "Inter", sans-serif;
	font-weight: 400;
	font-size: .76rem;
	color: var(--bz-muted);
}

/* Barvy míst (medaile + body + akcenty). */
.bz-tur .bz-podium__col--1 .bz-podium__medal,
.bz-tur .bz-podium__col--1 .bz-podium__pointsnum { color: var(--bz-gold); }
.bz-tur .bz-podium__col--2 .bz-podium__medal,
.bz-tur .bz-podium__col--2 .bz-podium__pointsnum { color: var(--bz-silver); }
.bz-tur .bz-podium__col--3 .bz-podium__medal,
.bz-tur .bz-podium__col--3 .bz-podium__pointsnum { color: var(--bz-bronze); }

/* --- Stupně pódia --- */
.bz-tur .bz-podium__step {
	position: relative;
	width: 100%;
	border-radius: 12px 12px 0 0;
	transform-origin: bottom center;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 12px;
	border: 1px solid rgba(255, 255, 255, .12);
	border-bottom: none;
}

.bz-tur .bz-podium__col--1 .bz-podium__step {
	height: 150px;
	background: linear-gradient(180deg, rgba(255, 207, 64, .3), rgba(255, 207, 64, .05));
	box-shadow: inset 0 1px 0 rgba(255, 207, 64, .5), 0 -8px 30px rgba(255, 207, 64, .18);
	border-color: rgba(255, 207, 64, .45);
}

.bz-tur .bz-podium__col--2 .bz-podium__step {
	height: 112px;
	background: linear-gradient(180deg, rgba(200, 204, 214, .26), rgba(200, 204, 214, .04));
	box-shadow: inset 0 1px 0 rgba(200, 204, 214, .45);
	border-color: rgba(200, 204, 214, .4);
}

.bz-tur .bz-podium__col--3 .bz-podium__step {
	height: 88px;
	background: linear-gradient(180deg, rgba(205, 127, 69, .26), rgba(205, 127, 69, .04));
	box-shadow: inset 0 1px 0 rgba(205, 127, 69, .45);
	border-color: rgba(205, 127, 69, .4);
}

.bz-tur .bz-podium__steprank {
	font-family: "Barlow", sans-serif;
	font-weight: 800;
	font-size: 2rem;
	color: rgba(255, 255, 255, .85);
	text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}

.bz-tur .bz-podium__col--1 .bz-podium__steprank { color: var(--bz-gold); }
.bz-tur .bz-podium__col--2 .bz-podium__steprank { color: var(--bz-silver); }
.bz-tur .bz-podium__col--3 .bz-podium__steprank { color: var(--bz-bronze); }

/* --- Prázdný stav --- */
.bz-tur .bz-podium--empty {
	text-align: center;
	padding-bottom: 40px;
}

.bz-tur .bz-podium__emptytext {
	position: relative;
	z-index: 1;
	max-width: 460px;
	margin: 0 auto;
	color: var(--bz-text);
}

/* --- Tabulka zbytku (4.+) --- */
.bz-tur .bz-ranking-panel {
	padding: 8px 6px;
	overflow-x: auto;
}

.bz-tur .bz-ranking-table {
	width: 100%;
	border-collapse: collapse;
	font-family: "Inter", sans-serif;
}

.bz-tur .bz-ranking-table th {
	font-family: "Barlow", sans-serif;
	font-weight: 700;
	font-size: .7rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bz-muted);
	text-align: left;
	padding: 14px 16px;
	border-bottom: 1px solid var(--bz-border);
}

.bz-tur .bz-ranking-table td {
	padding: 13px 16px;
	color: var(--bz-text);
	border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.bz-tur .bz-ranking-table tr:last-child td {
	border-bottom: none;
}

.bz-tur .bz-ranking-table .bz-rank-team {
	color: var(--bz-heading);
	font-weight: 600;
}

.bz-tur .bz-ranking-table .bz-rank-num {
	text-align: right;
}

.bz-tur .bz-ranking-table .bz-rank-pos {
	width: 48px;
	color: var(--bz-muted);
	font-family: "Barlow", sans-serif;
	font-weight: 700;
}

.bz-tur .bz-ranking-table .bz-rank-points {
	color: var(--bz-accent);
	font-family: "Barlow", sans-serif;
	font-weight: 800;
}

/* ==========================================================================
   ANIMACE – výchozí stav je FINÁLNÍ (no-JS / reduced-motion vidí hotové pódium).
   JS přidá .bz-anim-ready (nastaví počáteční skrytý stav) a poté .is-in (spustí).
   ========================================================================== */
.bz-tur .bz-podium.bz-anim-ready .bz-podium__step {
	transform: scaleY(0);
}

.bz-tur .bz-podium.bz-anim-ready .bz-podium__card {
	opacity: 0;
	transform: translateY(24px);
}

.bz-tur .bz-podium.bz-anim-ready .bz-podium__medal {
	opacity: 0;
	transform: scale(.4);
}

/* Přechody */
.bz-tur .bz-podium.bz-anim-ready .bz-podium__step {
	transition: transform var(--bz-podium-anim) var(--bz-podium-ease);
	transition-delay: var(--bz-delay, 0s);
}

.bz-tur .bz-podium.bz-anim-ready .bz-podium__card {
	transition: opacity 520ms ease, transform 520ms var(--bz-podium-ease);
	transition-delay: calc(var(--bz-delay, 0s) + 260ms);
}

.bz-tur .bz-podium.bz-anim-ready .bz-podium__medal {
	transition: opacity 460ms ease, transform 460ms var(--bz-podium-ease);
	transition-delay: calc(var(--bz-delay, 0s) + 360ms);
}

/* Cílový (spuštěný) stav */
.bz-tur .bz-podium.bz-anim-ready.is-in .bz-podium__step {
	transform: scaleY(1);
}

.bz-tur .bz-podium.bz-anim-ready.is-in .bz-podium__card {
	opacity: 1;
	transform: none;
}

.bz-tur .bz-podium.bz-anim-ready.is-in .bz-podium__medal {
	opacity: 1;
	transform: none;
}

/* --- Responsivita --- */
@media (max-width: 560px) {
	.bz-tur .bz-podium {
		padding: 32px 14px 40px;
	}
	.bz-tur .bz-podium__stage {
		gap: 6px;
	}
	.bz-tur .bz-podium__medal {
		width: 50px;
		height: 50px;
	}
	.bz-tur .bz-podium__medal .bz-ico {
		width: 24px;
		height: 24px;
	}
	.bz-tur .bz-podium__col--1 .bz-podium__step { height: 116px; }
	.bz-tur .bz-podium__col--2 .bz-podium__step { height: 86px; }
	.bz-tur .bz-podium__col--3 .bz-podium__step { height: 66px; }
	.bz-tur .bz-rank-hide-sm {
		display: none;
	}
}

/* --- Respekt k předvolbě omezeného pohybu --- */
@media (prefers-reduced-motion: reduce) {
	.bz-tur .bz-podium.bz-anim-ready .bz-podium__step,
	.bz-tur .bz-podium.bz-anim-ready .bz-podium__card,
	.bz-tur .bz-podium.bz-anim-ready .bz-podium__medal {
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}
}

/* --- Tlačítka „Přidat do kalendáře" v detailu --- */
.bz-tur .bz-calendar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 8px 0 24px;
}

.bz-tur .bz-calendar__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: 8px;
	font-family: "Inter", sans-serif;
	font-size: .9rem;
	text-decoration: none;
	color: var(--bz-heading);
	background: rgba(255, 255, 255, .04);
	border: 1px solid var(--bz-border);
	transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.bz-tur .bz-calendar__btn:hover {
	border-color: var(--bz-accent);
	background: rgba(255, 0, 255, .08);
	box-shadow: 0 0 18px rgba(255, 0, 255, .25);
}

.bz-tur .bz-calendar__btn .bz-ico {
	width: 18px;
	height: 18px;
	color: var(--bz-accent);
}
