/*
 * PLEY Apex API – Frontend Styles (dark-themed)
 *
 * Naming convention: BEM — .pley-apex__element--modifier
 * Scope: everything is nested inside .pley-apex so styles never leak.
 */

/* ================================================================
   Design tokens
   ================================================================ */
:root {
	--pley-apex-radius:       8px;   /* block / card radius */
	--pley-apex-radius-sm:    6px;   /* buttons / inputs */
	--pley-apex-radius-xs:    4px;   /* small icons / badges */
	--pley-apex-accent:       #e73232;
	--pley-apex-accent-dim:   rgba(231, 50, 50, 0.25);
	--pley-apex-bg:           #0d0d0d;
	--pley-apex-surface:      #131313;
	--pley-apex-surface-2:    #1a1a1a;
	--pley-apex-border:       rgba(255, 255, 255, 0.07);
	--pley-apex-border-dim:   rgba(255, 255, 255, 0.04);
	--pley-apex-text:         #c8c8c8;
	--pley-apex-text-bright:  #ffffff;
	--pley-apex-text-muted:   #6b6b6b;
	--pley-apex-green:        #3fb86a;
	--pley-apex-red-error:    #e05555;
}

/* ================================================================
   Container base — dark background for all shortcode types
   ================================================================ */
.pley-apex {
	font-family: inherit;
	font-size: 0.95em;
	line-height: 1.5;
	color: var(--pley-apex-text);
	margin: 1em 0;
	background: var(--pley-apex-bg);
	border-radius: var(--pley-apex-radius);
	overflow: hidden;
}

/* Padding for non-player types (player uses its own inner layout) */
.pley-apex--maps,
.pley-apex--servers {
	padding: 1.25em;
}

/* ================================================================
   Tables — dark theme
   ================================================================ */
.pley-apex__table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.5em;
}

.pley-apex__table th,
.pley-apex__table td {
	padding: 0.45em 0.75em;
	text-align: left;
	border: 1px solid var(--pley-apex-border);
	color: #c0c0c0;
}

.pley-apex__table thead th {
	background: rgba(255, 255, 255, 0.05);
	font-weight: 600;
	color: #808080;
}

.pley-apex__table tbody tr:nth-child(even) {
	background: rgba(255, 255, 255, 0.02);
}

/* ================================================================
   Cards — dark theme (server cards, legacy player card)
   ================================================================ */
.pley-apex__cards {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin-bottom: 0.5em;
}

.pley-apex__card {
	flex: 1 1 200px;
	max-width: 320px;
	border: 1px solid var(--pley-apex-border);
	border-radius: var(--pley-apex-radius);
	overflow: hidden;
	background: var(--pley-apex-surface);
}

.pley-apex__map-img,
.pley-apex__legend-img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	display: block;
}

.pley-apex__card-body {
	padding: 0.75em;
	display: flex;
	flex-direction: column;
	gap: 0.2em;
}

.pley-apex__card-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--pley-apex-accent);
	font-weight: 700;
}

.pley-apex__card-title {
	font-size: 1.05em;
	font-weight: 800;
	color: var(--pley-apex-text-bright);
}

.pley-apex__card-time {
	font-size: 0.8em;
	color: #555;
}

/* ================================================================
   Maps sections
   ================================================================ */
.pley-apex__maps-section {
	margin-bottom: 1.5em;
}

.pley-apex__maps-section:last-child {
	margin-bottom: 0;
}

.pley-apex .pley-apex__maps-section-title {
	font-size: 1.1em !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pley-apex-accent) !important;
	margin: 0 0 0.6em;
	padding: 0.4em 0;
	border-bottom: 1px solid var(--pley-apex-accent-dim);
}

/* ================================================================
   Map cards — full-image overlay
   ================================================================ */
.pley-apex__map-card {
	flex: 1 1 220px;
	min-width: 0;
	border-radius: var(--pley-apex-radius);
	overflow: hidden;
	border: 1px solid var(--pley-apex-border);
}

.pley-apex__map-card-bg {
	position: relative;
	height: 200px;
	background-color: var(--pley-apex-surface-2);
	background-size: cover;
	background-position: center;
}

.pley-apex__map-card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.0)  0%,
		rgba(0, 0, 0, 0.2)  40%,
		rgba(0, 0, 0, 0.88) 100%
	);
}

.pley-apex__map-card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0.75em 0.9em;
	display: flex;
	flex-direction: column;
	gap: 0.1em;
}

.pley-apex__map-card-content .pley-apex__card-label {
	font-size: 0.62rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--pley-apex-accent);
	font-weight: 700;
}

.pley-apex__map-card-content .pley-apex__card-title {
	font-size: 1.1em;
	font-weight: 800;
	color: var(--pley-apex-text-bright);
	line-height: 1.15;
}

.pley-apex__map-countdown {
	font-size: 2em;
	font-weight: 800;
	color: var(--pley-apex-text-bright);
	letter-spacing: -0.03em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.pley-apex__map-card-content .pley-apex__card-time {
	font-size: 0.72rem;
	color: rgba(255, 255, 255, 0.45);
	margin-top: 0.15em;
}

/* Game-mode badge shown on LTM / Mixtape cards (e.g. "Control", "Gun Run"). */
.pley-apex__card-mode {
	display: inline-block;
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pley-apex-text-bright);
	background: rgba(231, 50, 50, 0.55);
	border-radius: var(--pley-apex-radius-xs);
	padding: 0.15em 0.5em;
	margin-bottom: 0.1em;
	align-self: flex-start;
}

/* ================================================================
   Server status badges
   ================================================================ */
.pley-apex__server-status {
	display: inline-block;
	padding: 0.15em 0.55em;
	border-radius: var(--pley-apex-radius-xs);
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
}

.pley-apex__status--up   { background: rgba(31, 135, 60, 0.18); color: var(--pley-apex-green); }
.pley-apex__status--down { background: rgba(192, 57, 43, 0.18); color: var(--pley-apex-red-error); }

/* ================================================================
   Player trackers (cards format — legacy)
   ================================================================ */
.pley-apex__trackers {
	list-style: none;
	margin: 0.5em 0 0;
	padding: 0;
}

.pley-apex__trackers li {
	display: flex;
	justify-content: space-between;
	font-size: 0.85em;
	padding: 0.1em 0;
}

/* ================================================================
   Compact one-liner
   ================================================================ */
.pley-apex__compact {
	margin: 0.25em 0;
	font-size: 0.9em;
	color: #b0b0b0;
}

/* ================================================================
   Meta / footer
   ================================================================ */
.pley-apex__meta {
	font-size: 0.75em;
	color: var(--pley-apex-accent);
	margin: 0.8em 0 0;
	padding: 0.6em 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pley-apex--maps .pley-apex__meta,
.pley-apex--servers .pley-apex__meta {
	margin: 0.8em -1.25em -1.25em;
	padding: 0.6em 1.25em;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pley-apex--player .pley-apex__meta {
	padding: 0.6em 1em;
	margin: 0;
}

.pley-apex__meta a {
	color: #555;
}

.pley-apex__status--error { color: var(--pley-apex-red-error); }

/* ================================================================
   Error notice
   ================================================================ */
.pley-apex__error {
	border-left: 4px solid var(--pley-apex-accent);
	padding: 0.6em 1em;
	background: rgba(192, 57, 43, 0.12);
	border-radius: var(--pley-apex-radius);
}

/* ================================================================
   JSON debug (admin-only)
   ================================================================ */
.pley-apex__json {
	background: #1e1e1e;
	color: #d4d4d4;
	padding: 1em;
	border-radius: var(--pley-apex-radius);
	overflow-x: auto;
	font-size: 0.8em;
	line-height: 1.4;
}

/* ================================================================
   Responsive — shared
   ================================================================ */
@media (max-width: 600px) {
	.pley-apex__table {
		font-size: 0.85em;
	}

	.pley-apex__table th,
	.pley-apex__table td {
		padding: 0.3em 0.5em;
	}

	.pley-apex__card {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.pley-apex__map-card {
		flex: 1 1 100%;
	}

	.pley-apex--maps,
	.pley-apex--servers {
		padding: 0.9em;
	}
}

/* ================================================================
   Server status sections
   ================================================================ */
.pley-apex .pley-apex__server-section {
	margin-bottom: 1.25em;
}

.pley-apex .pley-apex__server-section:last-child {
	margin-bottom: 0;
}

.pley-apex .pley-apex__server-section-title {
	font-size: 1.1em !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pley-apex-accent) !important;
	margin: 0 0 0.4em;
	padding: 0.4em 0;
	border-bottom: 1px solid var(--pley-apex-accent-dim);
}

.pley-apex .pley-apex__server-table {
	width: 100%;
	table-layout: fixed;
}

.pley-apex .pley-apex__server-table th:nth-child(1),
.pley-apex .pley-apex__server-table td:nth-child(1) { width: 60%; }

.pley-apex .pley-apex__server-table th:nth-child(2),
.pley-apex .pley-apex__server-table td:nth-child(2) { width: 20%; }

.pley-apex .pley-apex__server-table th:nth-child(3),
.pley-apex .pley-apex__server-table td:nth-child(3) { width: 20%; }

/* ================================================================
   Player profile card
   ================================================================ */

/* Center the player block within the content column. */
.pley-apex--player {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 697px !important;
}

.pley-apex__player-profile {
	background: var(--pley-apex-bg);
	overflow: hidden;
	border-radius: var(--pley-apex-radius);
}

/* ── Hero banner ─────────────────────────────────────────────── */
.pley-apex .pley-apex__player-banner {
	position: relative;
	height: 220px;
	background-color: var(--pley-apex-surface-2);
	background-size: cover;
	background-position: center 20%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.pley-apex .pley-apex__player-banner-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.05) 0%,
		rgba(0, 0, 0, 0.25) 50%,
		rgba(0, 0, 0, 0.82) 100%
	);
}

.pley-apex .pley-apex__player-legend-watermark {
	position: absolute;
	bottom: 0.5em;
	right: 1em;
	font-size: 3.5rem !important;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.04em;
	color: rgba(255, 255, 255, 0.13) !important;
	line-height: 1;
	pointer-events: none;
	user-select: none;
	text-align: right;
}

/* ── Status badge ────────────────────────────────────────────── */
.pley-apex .pley-apex__player-status-badge {
	position: absolute;
	top: 0.75em;
	right: 0.9em;
	display: flex;
	align-items: center;
	gap: 0.35em;
	font-size: 0.7rem !important;
	font-weight: 600;
	padding: 0.25em 0.65em;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #a5a5a5 !important;
}

.pley-apex .pley-apex__player-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	background: #555;
}

.pley-apex .pley-apex__player-status--online .pley-apex__player-status-dot  { background: var(--pley-apex-green); }
.pley-apex .pley-apex__player-status--ingame  .pley-apex__player-status-dot { background: var(--pley-apex-accent); }
.pley-apex .pley-apex__player-status--offline .pley-apex__player-status-dot { background: #555; }

.pley-apex .pley-apex__player-status--online { color: var(--pley-apex-green) !important; border-color: rgba(63, 184, 106, 0.25); }
.pley-apex .pley-apex__player-status--ingame { color: var(--pley-apex-accent) !important; border-color: rgba(231, 50, 50, 0.25); }

/* ── Identity bar ────────────────────────────────────────────── */
.pley-apex .pley-apex__player-identity {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: var(--pley-apex-surface-2);
	border-top: 2px solid var(--pley-apex-accent);
	padding: 0.9em 1.1em;
	flex-wrap: wrap;
}

.pley-apex .pley-apex__player-identity-left {
	display: flex;
	align-items: center;
	gap: 0.9em;
	min-width: 0;
}

.pley-apex .pley-apex__player-rank-img {
	width: 52px;
	height: 52px;
	object-fit: contain;
	flex-shrink: 0;
}

.pley-apex .pley-apex__player-identity-info {
	display: flex;
	flex-direction: column;
	gap: 0.2em;
	min-width: 0;
}

.pley-apex .pley-apex__player-name {
	font-size: 1.3rem !important;
	font-weight: 800;
	color: var(--pley-apex-text-bright) !important;
	line-height: 1.15;
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pley-apex .pley-apex__player-meta-line {
	font-size: 0.72rem !important;
	color: var(--pley-apex-text-muted) !important;
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex-wrap: wrap;
}

.pley-apex .pley-apex__player-platform-badge {
	background: rgba(231, 50, 50, 0.15);
	color: var(--pley-apex-accent) !important;
	border: 1px solid rgba(231, 50, 50, 0.3);
	border-radius: var(--pley-apex-radius-xs);
	font-size: 0.6rem !important;
	font-weight: 700;
	padding: 0.1em 0.45em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.pley-apex .pley-apex__player-xp-bar-wrap {
	display: inline-block;
	width: 44px;
	height: 3px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 2px;
	overflow: hidden;
	vertical-align: middle;
}

.pley-apex .pley-apex__player-xp-bar {
	display: block;
	height: 100%;
	background: var(--pley-apex-accent);
	border-radius: 2px;
}

.pley-apex .pley-apex__player-identity-right {
	flex-shrink: 0;
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.15em;
}

.pley-apex .pley-apex__player-rank-name {
	font-size: 0.6rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #a5a5a5 !important;
}

.pley-apex .pley-apex__player-rank-rp {
	font-size: 1.1rem !important;
	font-weight: 800;
	color: var(--pley-apex-accent) !important;
	letter-spacing: -0.01em;
	line-height: 1;
}

.pley-apex .pley-apex__player-rank-ladder {
	font-size: 0.6rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #5a5a5a !important;
	line-height: 1;
}

/* ── Section title ───────────────────────────────────────────── */
.pley-apex .pley-apex__player-section-title {
	font-size: 1.1em !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pley-apex-accent) !important;
	background: #111;
	padding: 0.4em 1em 0.4em 1.45em;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid var(--pley-apex-accent-dim);
	position: relative;
}

.pley-apex .pley-apex__player-section-title::before {
	content: '';
	position: absolute;
	left: 0.55em;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 0.75em;
	background: var(--pley-apex-accent);
	border-radius: 1px;
}

/* ── Tracker cards ───────────────────────────────────────────── */
.pley-apex .pley-apex__player-trackers {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	background: #141414;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pley-apex .pley-apex__player-trackers--weapon {
	grid-template-columns: repeat(2, 1fr);
	background: #111;
	border-top: 2px solid rgba(255, 255, 255, 0.05);
}

.pley-apex .pley-apex__tracker-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1em 0.75em;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
	gap: 0.2em;
	transition: background 0.15s;
}

.pley-apex .pley-apex__tracker-card:last-child {
	border-right: none;
}

.pley-apex .pley-apex__tracker-card:hover {
	background: rgba(255, 255, 255, 0.02);
}

.pley-apex .pley-apex__tracker-value {
	font-size: 1.6rem !important;
	font-weight: 800;
	color: var(--pley-apex-text-bright) !important;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.pley-apex .pley-apex__tracker-label {
	font-size: 0.6rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--pley-apex-text-muted) !important;
	text-align: center;
}

/* ================================================================
   Legend stats — 2-column card grid
   ================================================================ */
.pley-apex__player-legends {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: rgba(255, 255, 255, 0.07);
}

.pley-apex__legend-row {
	background: #0f0f0f;
	padding: 0;
}

.pley-apex__legend-row--selected {
	grid-column: 1 / -1;
	background: rgba(231, 50, 50, 0.05);
	border-left: 3px solid var(--pley-apex-accent);
}

.pley-apex__legend-row-content {
	display: flex;
	flex-direction: row;
	gap: 0.75em;
	align-items: flex-start;
	padding: 0.75em 0.85em;
}

.pley-apex__legend-row-image-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35em;
	flex-shrink: 0;
	width: 80px;
}

.pley-apex__legend-row-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	width: 100%;
	flex-wrap: wrap;
}

.pley-apex__legend-row-icon {
	width: 80px;
	height: 90px;
	object-fit: contain;
	border-radius: var(--pley-apex-radius-xs);
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.03);
}

.pley-apex__legend-row-name {
	font-size: 0.6rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #a0a0a0 !important;
	text-align: center;
}

.pley-apex__legend-row-badge {
	font-size: 0.5rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pley-apex-accent) !important;
	border: 1px solid rgba(231, 50, 50, 0.4);
	border-radius: 3px;
	padding: 0.1em 0.4em;
}

/* Stats: column stack for compact grid cells */
.pley-apex__legend-row-stats {
	display: flex;
	flex-direction: column;
	gap: 0;
	flex: 1;
	min-width: 0;
}

.pley-apex__legend-stat {
	display: flex;
	flex-direction: column;
	gap: 0.05em;
	padding: 0.3em 0;
	border-bottom: 1px solid var(--pley-apex-border-dim);
}

.pley-apex__legend-stat:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.pley-apex__legend-stat-value {
	font-size: 1.0rem !important;
	font-weight: 800;
	color: var(--pley-apex-text-bright) !important;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}

.pley-apex__legend-stat-label {
	font-size: 0.5rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #5a5a5a !important;
	margin-top: 0.1em;
}

.pley-apex__legend-stat-pct {
	font-size: 0.55rem !important;
	font-weight: 600;
	color: var(--pley-apex-accent) !important;
}

/* ── Selected / active legend: full-width, larger treatment ── */
.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-row-image-col {
	width: 130px;
}

.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-row-icon {
	width: 130px;
	height: 145px;
	background: rgba(255, 255, 255, 0.03);
}

.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-row-name {
	font-size: 0.72rem !important;
	color: #e0e0e0 !important;
}

.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-row-stats {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.5em 1.5em;
	align-content: flex-start;
}

.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-stat {
	border-bottom: none;
	padding-bottom: 0;
	min-width: 80px;
}

.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-stat-value {
	font-size: 1.35rem !important;
}

.pley-apex .pley-apex__legend-row--selected .pley-apex__legend-stat-label {
	font-size: 0.55rem !important;
}

/* ================================================================
   Player search form
   ================================================================ */

/* Standalone search-only block (no player result yet) */
.pley-apex.pley-apex--player-search {
	/* background / radius inherited from .pley-apex */
}

/* Inner search form wrapper */
.pley-apex__player-search-wrap {
	padding: 1.1em 1.25em;
}

/* Separator when search lives above player result */
.pley-apex--player .pley-apex__player-search-wrap {
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pley-apex__search-form {
	display: flex;
	flex-direction: column;
	gap: 0.65em;
}

.pley-apex__search-platforms {
	display: flex;
	gap: 0.4em;
	flex-wrap: wrap;
}

.pley-apex__platform-btn {
	display: inline-flex;
	align-items: center;
	padding: 0.3em 0.85em;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--pley-apex-radius-sm);
	cursor: pointer;
	font-size: 0.72rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--pley-apex-text-muted) !important;
	background: transparent;
	transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.pley-apex__platform-btn input[type="radio"] {
	display: none;
}

.pley-apex__platform-btn:has(input:checked) {
	border-color: rgba(231, 50, 50, 0.6);
	color: var(--pley-apex-text-bright) !important;
	background: rgba(231, 50, 50, 0.12);
}

.pley-apex__search-row {
	display: flex;
	gap: 0.5em;
}

.pley-apex__search-input {
	flex: 1 1 auto;
	min-width: 0;
	background: rgba(255, 255, 255, 0.05) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-radius: var(--pley-apex-radius-sm) !important;
	color: var(--pley-apex-text-bright) !important;
	padding: 0.55em 0.85em !important;
	font-size: 0.9rem !important;
	outline: none !important;
	box-shadow: none !important;
}

.pley-apex__search-input:focus {
	border-color: rgba(231, 50, 50, 0.5) !important;
}

.pley-apex__search-btn {
	flex-shrink: 0;
	background: var(--pley-apex-accent) !important;
	color: var(--pley-apex-text-bright) !important;
	border: none !important;
	border-radius: var(--pley-apex-radius-sm) !important;
	padding: 0.55em 1.25em !important;
	font-size: 0.8rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	white-space: nowrap;
	transition: background 0.12s;
}

.pley-apex__search-btn:hover {
	background: #c42020 !important;
}

/* ================================================================
   Broken-image fallback — CSS-only, no inline JS needed.
   When a legend icon URL returns a 404 the img renders as a
   transparent box the same size as the image slot, which looks
   clean without requiring any JavaScript or inline event handlers.
   ================================================================ */
.pley-apex__legend-row-icon[src=""],
.pley-apex__legend-row-icon:not([src]) {
	opacity: 0;
}

/* ================================================================
   Responsive — player profile
   ================================================================ */
@media (max-width: 600px) {
	.pley-apex .pley-apex__player-banner {
		height: 180px;
	}

	.pley-apex .pley-apex__player-identity {
		gap: 0.6rem;
		padding: 0.75em 0.9em;
	}

	.pley-apex .pley-apex__player-name {
		font-size: 1.1rem !important;
	}

	.pley-apex .pley-apex__player-rank-img {
		width: 42px;
		height: 42px;
	}

	.pley-apex .pley-apex__tracker-value {
		font-size: 1.25rem !important;
	}

	/* Collapse legend grid to single column */
	.pley-apex .pley-apex__player-legends {
		grid-template-columns: 1fr;
	}

	.pley-apex .pley-apex__legend-row--selected {
		grid-column: 1;
	}
}
