/* ════════════════════════════════════════════════════════════════════════════
   SQUAD PAGE
   New player-card layer system (.pc-*) replacing old squad styles.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
	--pos-h: 48px;
	--card-h: 200px;
	--card-w: 260px;
}

/* Squad has a second sticky bar below the main nav. */
/* ── Position nav bar ── */
.pos-nav {
	position: sticky;
	top: var(--nav-h);
	z-index: 20;
	height: var(--pos-h);
	display: flex;
	align-items: center;
	padding: 0 32px;
	gap: 0;
	background: rgba(244, 244, 244);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	overflow-x: auto;
	scrollbar-width: none;
}

.pos-nav::-webkit-scrollbar {
	display: none;
}

.pos-nav__btn {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	height: 100%;
	padding: 0 16px;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--ink-dim);
	letter-spacing: 0.01em;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition:
		color 0.15s,
		border-color 0.15s;
	cursor: pointer;
}

.pos-nav__btn:hover {
	color: var(--ink);
}

.pos-nav__btn.active {
	color: var(--ink);
	border-bottom-color: var(--navy);
}

.pos-nav__count {
	font-size: 0.6rem;
	font-weight: 700;
	background: var(--ink-faint);
	color: var(--ink-dim);
	padding: 1px 6px;
	border-radius: 99px;
}

.pos-nav__btn.active .pos-nav__count {
	background: rgba(15, 30, 60, 0.1);
	color: var(--navy);
}

/* ── Info strip (inside page-header) ── */
.info-strip {
	overflow: hidden;
	padding: 20px 0 0;
	gap: 8px;
	flex-wrap: wrap;
	overflow-x: auto;
	scrollbar-width: none;
	flex-direction: column;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	margin-top: 24px;
	width: 100%;
}

/* info-pill */
.page-header .info-pill {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.14);
}

.page-header .info-pill__label {
	color: rgba(255, 255, 255, 0.5);
}

.page-header .info-pill__value {
	color: var(--text-white);
}

.page-header .info-pill--accent .info-pill__value {
	color: var(--text-white);
}

.page-header .info-sep {
	background: rgba(255, 255, 255, 0.15);
}

/* quick-stats */
.page-header .pos-section__title {
	color: var(--text-white);
}

.page-header .qs-chevron {
	color: rgba(255, 255, 255, 0.45);
}

.page-header .qs-block {
	border-right-color: rgba(255, 255, 255, 0.12);
}

.page-header .qs-block__title {
	color: rgba(255, 255, 255, 0.5);
}

.page-header .qs-table tr {
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.page-header .qs-lbl {
	color: rgba(255, 255, 255, 0.5);
}

.page-header .qs-val {
	color: var(--text-white);
}

.page-header .qs-val--accent {
	color: var(--text-white);
}

@media (max-width: 600px) {
	.page-header .qs-block {
		border-bottom-color: rgba(255, 255, 255, 0.12);
	}
}

.info-strip-content {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	flex-wrap: wrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.info-strip-content-pills-div-wrapper {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-wrap: wrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.info-strip-content-pills-div {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	overflow-x: auto;
	scrollbar-width: none;
}

@media (max-width: 1100px) {
	.info-sep {
		width: 100% !important;
		height: 1px !important;
	}
	.info-strip-content {
		display: grid;
		grid-template-rows: 1fr 0.3fr 1fr 0.3fr 1fr;
	}
}

.info-strip::-webkit-scrollbar {
	display: none;
}

.info-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 13px;
	background: var(--bg);
	border: 1.5px solid var(--border);
	border-radius: 99px;
	flex-shrink: 0;
}

.info-pill--accent .info-pill__value {
	color: var(--navy);
}

.info-pill__label {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-dim);
	white-space: nowrap;
}

.info-pill__value {
	font-size: 0.78rem;
	font-weight: 800;
	color: var(--ink);
	white-space: nowrap;
	letter-spacing: -0.01em;
}

.info-sep {
	width: 1px;
	height: 18px;
	background: var(--border);
	flex-shrink: 0;
	margin: 0 4px;
}

/* ── Quick-Stats table layout ── */
.qs-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	color: inherit;
	text-align: left;
}

.qs-toggle:focus-visible {
	outline: 2px solid var(--navy);
	outline-offset: 2px;
	border-radius: 3px;
}

.qs-chevron {
	flex-shrink: 0;
	color: var(--ink-dim);
	transition: transform 0.22s ease;
}

.qs-toggle[aria-expanded='true'] .qs-chevron {
	transform: rotate(180deg);
}

.qs-grid {
	display: none;
	gap: 0;
	margin-top: 18px;
	flex-wrap: wrap;
}

.qs-grid.qs-grid--open {
	display: flex;
}

.qs-block {
	flex: 1 1 auto;
	min-width: 130px;
	padding-right: 28px;
	margin-right: 28px;
	border-right: 1px solid var(--border);
}

.qs-block:last-child {
	border-right: none;
	padding-right: 0;
	margin-right: 0;
}

.qs-block__title {
	display: block;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-dim);
	margin-bottom: 10px;
}

.qs-table {
	width: 100%;
	border-collapse: collapse;
}

.qs-table tr {
	border-bottom: 1px solid var(--border);
}

.qs-table tr:last-child {
	border-bottom: none;
}

.qs-lbl {
	font-size: 0.65rem;
	font-weight: 600;
	color: var(--ink-dim);
	padding: 5px 16px 5px 0;
	white-space: nowrap;
}

.qs-val {
	font-size: 0.72rem;
	font-weight: 800;
	color: var(--ink);
	text-align: right;
	padding: 5px 0;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.qs-val--accent {
	color: var(--navy);
}

@media (max-width: 600px) {
	.qs-grid {
		flex-direction: column;
		gap: 16px;
	}

	.qs-block {
		border-right: none;
		border-bottom: 1px solid var(--border);
		padding-right: 0;
		margin-right: 0;
		padding-bottom: 16px;
	}

	.qs-block:last-child {
		border-bottom: none;
		padding-bottom: 0;
	}
}

/* ── Position section ── */
.pos-section {
	overflow: visible;
	position: relative;
	padding: 28px 28px 24px;
	scroll-margin-top: 112px;
	gap: 0;
}

/* :target::before fallback for browsers / containers where scroll-margin-top
   is not honoured on a non-root scroll container */
.pos-section:target::before {
	content: '';
	display: block;
	height: 112px;
	margin: -112px 0 0;
}

@media (max-width: 900px) {
	.pos-section {
		scroll-margin-top: 104px;
	}
	.pos-section:target::before {
		content: '';
		display: block;
		height: 104px;
		margin: -104px 0 0;
	}
}

.pos-section__header {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 18px;
}

.pos-section__title {
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.pos-section__sub {
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-dim);
}

/* ── Player grid ── */
.player-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--card-w, 260px), 1fr));
	gap: 10px;
}

/* ══════════════════════════════════════
   PLAYER CARD  — exact hero layer composition
   Layer order (bottom → top):
     1. .player-card base        — solid navy
     2. .pc-bg                   — arena image (exclusion, opacity 0.4) mirrors .hero-bg
     3. .pc-bg::after            — gold/navy colour stripe (color blend) mirrors .hero-bg::after
     4. .player-card::before     — badge strip (z-2, behind photo) mirrors .hero-badge-strip
     5. .pc-photo                — player portrait (z-3)
     6. .pc-overlay              — navy lighten tint (z-4)
     7. .pc-grad                 — bottom gradient (z-5, height 65%) mirrors .hero-grad-bottom
     8. .pc-bar                  — gold accent line (z-20, hover)
     9. .pc-body                 — text content (z-10)
    10. .player-card::after      — grain noise (z-12, screen blend) mirrors .hero::after
   ══════════════════════════════════════ */
.player-card {
	position: relative;
	height: var(--card-h, 200px);
	border-radius: 12px;
	overflow: hidden;
	isolation: isolate;
	clip-path: inset(0 round 12px);
	display: block;
	cursor: pointer;
	background: var(--navy);
	transition:
		transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1),
		box-shadow 0.22s ease;
	will-change: transform;
}

.player-card:active {
	transform: scale(0.97);
	box-shadow: none;
}

/* ── Badge strip — behind photo (mirrors .hero-badge-strip, z-index 2) ── */
.player-card::before {
	content: '';
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 36px;
	background: url('../../img/img-static/badge-rebels2.webp') repeat-y left
		top / contain;
	z-index: 2;
	opacity: 0.75;
	pointer-events: none;
}

.player-card.is-foeli::before {
	background-image: url('/wp-content/uploads/2026/04/badge-secjam.webp');
}

/* ── Grain texture overlay — topmost (mirrors .hero::after, z-index 12) ── */
.player-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url('../../img/img-static/bg-noise.webp');
	background-size: 120px;
	mix-blend-mode: screen;
	z-index: 12;
	pointer-events: none;
	opacity: 0.5;
}

/* ── Arena background image (mirrors .hero-bg: exclusion blend, opacity 0.4) ── */
.pc-bg {
	position: absolute;
	inset: 0;
	/* background-image is set lazily via JS once the asset loads */
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	mix-blend-mode: exclusion;
	z-index: 1;
	transition: opacity 0.5s ease;
}

/* ── Gold/navy colour stripe (mirrors .hero-bg::after: color blend) ── */
.pc-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		var(--gold) 0%,
		var(--gold) 35%,
		var(--navy) 35%,
		var(--navy) 65%,
		var(--gold) 65%,
		var(--gold) 100%
	);
	mix-blend-mode: color;
}

/* ── Player portrait (z-3, above badge strip at z-2) ── */
.pc-photo {
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	position: absolute;
	inset: 0;
	overflow: hidden;
	clip-path: inset(0 round 12px);
	z-index: 3;
}

.pc-photo img {
	margin-top: 5px;
	width: 130%;
	height: 130%;
	object-fit: cover;
	object-position: center top;
	filter: drop-shadow(0 0 0.75rem var(--navy)) blur(4px);
	transition: filter 0.35s ease;
}

/* Once the higher-res image has loaded, remove the initial blur */
.pc-photo img.pc-img--loaded {
	filter: drop-shadow(0 0 0.75rem var(--navy));
}

/* ── Navy lighten tint (z-4, above photo) ── */
.pc-overlay {
	position: absolute;
	inset: 0;
	background: var(--card-bg, var(--navy));
	mix-blend-mode: lighten;
	opacity: 0.4;
	z-index: 4;
}

/* ── Bottom gradient (mirrors .hero-grad-bottom exactly: height 65%, z-5) ── */
.pc-grad {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 65%;
	background: linear-gradient(
		180deg,
		rgba(15, 30, 60, 0) 0%,
		rgba(15, 30, 60, 0.65) 50%,
		rgba(15, 30, 60, 0.92) 75%,
		var(--navy) 100%
	);
	z-index: 5;
}

.pc-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2.5px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
	z-index: 20;
}

.player-card:hover .pc-bar {
	transform: scaleX(1);
}

/* ── Card body ── */
.pc-body {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 14px 16px 16px;
	z-index: 10;
}

.pc-num {
	position: absolute;
	top: 12px;
	left: 14px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	color: rgba(255, 255, 255, 0.7);
	font-variant-numeric: tabular-nums;
}

.pc-nat {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 0.54rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.9);
	background: var(--navy);
	padding: 2px 7px;
	border-radius: 4px;
}

.pc-foreigner {
	color: var(--navy);
	background: var(--gold);
}

.pc-first {
	font-size: 0.66rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.62);
	letter-spacing: 0.02em;
	line-height: 1.2;
	margin-bottom: 1px;
}

.pc-last {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--text-white);
	letter-spacing: -0.02em;
	line-height: 1.05;
	text-transform: uppercase;
}

.pc-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 5px;
}

.pc-pos {
	font-size: 0.52rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bg);
	background: rgba(255, 255, 255, 0.1);
	padding: 2px 7px;
	border-radius: 4px;
}

.pc-age {
	font-size: 0.58rem;
	font-weight: 500;
	color: var(--border);
}

.pc-stats {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.pc-stat {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.pc-stat-val {
	font-size: 0.88rem;
	font-weight: 800;
	color: var(--text-white);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.pc-stat-lbl {
	font-size: 0.48rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.36);
}

/* ── Skeleton loading ── */
@keyframes sk-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.player-card--skeleton {
	pointer-events: none;
	cursor: default;
	background: rgba(15, 30, 60, 0.12);
}

.player-card--skeleton::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.07) 50%,
		transparent 100%
	);
	background-size: 200% 100%;
	animation: sk-shimmer 1.6s ease-in-out infinite;
	z-index: 20;
	pointer-events: none;
}

.sk-body {
	position: absolute;
	bottom: 14px;
	left: 14px;
	right: 14px;
	z-index: 10;
}

.sk-bar {
	background: rgba(255, 255, 255, 0.11);
	border-radius: 4px;
	margin-bottom: 5px;
	height: 8px;
}

.sk-bar--first {
	width: 48%;
	height: 6px;
}

.sk-bar--last {
	width: 78%;
	height: 12px;
}

.sk-bar--meta {
	width: 38%;
	height: 6px;
	margin-top: 9px;
	margin-bottom: 0;
}

.sk-stat-row {
	display: flex;
	gap: 10px;
	margin-top: 9px;
}

.sk-stat-block {
	width: 28px;
	height: 20px;
	background: rgba(255, 255, 255, 0.09);
	border-radius: 4px;
}

/* ── Spacer ── */
.spacer {
	height: 20px;
}

/* ══════════════════════════════════════
   RESPONSIVE - SQUAD
   ══════════════════════════════════════ */
@media (max-width: 900px) {
	.pos-nav {
		padding: 0 16px;
	}

	:root {
		--card-w: 220px;
		--card-h: 180px;
	}
}

@media (max-width: 580px) {
	:root {
		--pos-h: 44px;
		--card-w: 180px;
		--card-h: 158px;
	}

	.pos-nav {
		padding: 0 12px;
	}

	.pos-nav__btn {
		padding: 0 10px;
		font-size: 0.68rem;
	}

	.pos-section {
		padding: 20px 16px 18px;
	}

	.info-strip {
		padding: 16px 18px;
	}

	.pc-stats {
		display: none;
	}

	.pc-last {
		font-size: 0.9rem;
	}

	.player-grid {
		grid-template-columns: 1fr 1fr;
	}

	.pc-photo img {
		width: 120%;
		object-fit: cover;
		object-position: center -10%;
	}
}

@media (max-width: 380px) {
	:root {
		--card-w: 150px;
		--card-h: 148px;
	}
}

/* Dark theme adjustments */
html[data-theme='dark'] .player-card {
	border: 1.5px solid var(--border);
}

html[data-theme='dark'] .info-pill__value {
	color: var(--text-white);
}
