/*
 * Reusable visual components: buttons, breadcrumbs, entity header/stats,
 * article-card list rows, standings table, fixtures list, competition
 * cards, empty states. Square corners, no shadows — elevation is a 1px
 * rule plus (where documented) a 2-3px accent edge.
 */

/* ---------- Buttons ---------- */

.fb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 26px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	border: 1px solid transparent;
	background: none;
}

.fb-btn--outline {
	border-color: var(--ink);
	color: var(--ink);
}

.fb-btn--outline:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* ---------- Breadcrumbs ---------- */

.fb-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .11em;
	color: var(--ink2);
	margin-bottom: 22px;
}

.fb-breadcrumbs a:hover {
	color: var(--accent);
}

.fb-breadcrumbs .is-current {
	color: var(--ink);
}

/* ---------- Entity header (Player / Club / Competition) ---------- */

.fb-entity-header {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	padding-bottom: 26px;
	border-bottom: 2px solid var(--ink);
}

.fb-entity-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 20px;
	font-weight: 800;
	flex: 0 0 auto;
	overflow: hidden;
}

.fb-entity-badge--crest {
	border-radius: 999px;
}

.fb-entity-badge img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fb-entity-title {
	font-size: clamp(30px, 3.6vw, 48px);
	line-height: 1;
	letter-spacing: -.035em;
	margin: 0 0 8px;
}

.fb-entity-meta {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .11em;
	color: var(--ink2);
}

.fb-entity-stat-group {
	display: flex;
	gap: 26px;
}

.fb-entity-stat-value {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -.03em;
	color: var(--accent);
	line-height: 1;
}

.fb-entity-stat-label {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .11em;
	color: var(--ink2);
	margin-top: 6px;
}

/* Player layout: portrait + fact grid */

.fb-player-layout {
	display: grid;
	grid-template-columns: var(--cols-player);
	gap: 32px;
	align-items: end;
	padding-bottom: 30px;
	border-bottom: 2px solid var(--ink);
}

.fb-player-portrait {
	aspect-ratio: 4 / 5;
	background: var(--band);
	overflow: hidden;
	max-width: 260px;
}

.fb-player-portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- No-image fallback (Phase 15) ----------
   Reuses the same --sunk surface already used by the ad slot, so a
   missing image and a reserved ad space read as the same deliberate
   "nothing here yet" language rather than two different treatments.
   Base rule matches the plain width/height:100% pattern already used by
   .fb-player-portrait img (a real, aspect-ratio-boxed parent); the hero/
   featured contexts below additionally need position:absolute like their
   own img siblings, since those parents size themselves via min-height
   rather than aspect-ratio. */

.fb-image-fallback {
	width: 100%;
	height: 100%;
	background: var(--sunk);
}

.fb-hero-media .fb-image-fallback,
.fb-article-hero-media .fb-image-fallback,
.fb-featured-media .fb-image-fallback {
	position: absolute;
	inset: 0;
}

.fb-image-fallback--mono {
	display: flex;
	align-items: center;
	justify-content: center;
}

.fb-image-fallback--mono span {
	font-size: 64px;
	font-weight: 800;
	color: var(--ink2);
}

.fb-player-kicker {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .18em;
	color: var(--accent);
	margin-bottom: 12px;
}

.fb-player-name {
	font-size: clamp(32px, 4vw, 56px);
	line-height: .98;
	letter-spacing: -.04em;
	margin: 0 0 18px;
}

/* Fact / stat tile grid (Player facts, Club stats) */

.fb-tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 1px;
	background: var(--rule);
	border: 1px solid var(--rule);
}

.fb-tile {
	background: var(--surface);
	padding: 14px 16px;
}

.fb-tile-label {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .11em;
	color: var(--ink2);
	margin-bottom: 6px;
}

.fb-tile-value {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--ink);
}

/* ---------- Article-card list row (news lists on entity pages) ---------- */

.fb-section-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--ink);
	margin-bottom: 0;
}

.fb-section-heading h2 {
	font-size: 20px;
	letter-spacing: -.02em;
}

.fb-news-list {
	border-top: 2px solid var(--ink);
	list-style: none;
	margin: 0;
	padding: 0;
}

.fb-news-list-row {
	display: grid;
	grid-template-columns: var(--cols-list);
	gap: 20px;
	align-items: baseline;
	padding: 19px 4px;
	border-bottom: 1px solid var(--rule);
	transition: padding-left .2s ease;
}

.fb-news-list-row:hover {
	padding-left: 12px;
}

.fb-news-list-kicker {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .13em;
	color: var(--accent);
}

.fb-news-list-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.028em;
	color: var(--ink);
	text-wrap: pretty;
}

.fb-news-list-row:hover .fb-news-list-title {
	color: var(--accent);
}

.fb-news-list-meta {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .09em;
	color: var(--ink2);
}

/* ---------- Competition standings table ----------
   Final completion pass: extended from the original 4-column layout
   (pos, club, num, pts) to the full Position/Club/P/W/D/L/GF/GA/GD/Pts
   set the standings feature needs, using the same tokens/typography —
   no other template referenced these classes (grepped empty), so this
   is additive, not a redesign of anything already on screen. */

.fb-table-head {
	display: grid;
	grid-template-columns: 28px 1fr repeat(7, 38px) 46px;
	gap: 10px;
	padding: 10px 4px;
	border-bottom: 1px solid var(--rule);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--ink2);
}

.fb-table-wrap {
	border-top: 2px solid var(--ink);
	overflow-x: auto;
}

.fb-table-row {
	display: grid;
	grid-template-columns: 28px 1fr repeat(7, 38px) 46px;
	gap: 10px;
	align-items: center;
	padding: 13px 4px;
	border-bottom: 1px solid var(--rule);
}

.fb-table-pos {
	font-size: 13px;
	font-weight: 700;
	color: var(--ink2);
}

.fb-table-club {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.018em;
	color: var(--ink);
}

.fb-table-num {
	font-size: 13px;
	font-weight: 500;
	color: var(--ink2);
	text-align: center;
}

.fb-table-pts {
	font-size: 15px;
	font-weight: 800;
	color: var(--accent);
	text-align: center;
}

/* ---------- Next fixtures list ---------- */

.fb-fixture-row {
	padding: 15px 4px;
	border-bottom: 1px solid var(--rule);
}

.fb-fixture-when {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .11em;
	color: var(--accent);
	margin-bottom: 7px;
}

.fb-fixture-tie {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -.02em;
	color: var(--ink);
}

/* ---------- Live match card ----------
   Reuses existing tokens/patterns only: --surface/--rule (card, matching
   .fb-featured-card), --accent 3px top edge (design.md's documented
   "Fixtures have 3px accent top edge"), .fb-dot's existing pulse
   animation (already used by the Breaking pill), and --sunk for the
   crest fallback fill (same language as the Phase 15/18 image fallback). */

.fb-live-card {
	background: var(--surface);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--accent);
	padding: 18px 20px 20px;
	margin-bottom: 16px;
}

.fb-live-card-status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.fb-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	background: var(--accent);
	color: var(--accent-ink);
	padding: 5px 10px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .16em;
}

.fb-live-badge .fb-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--accent-ink);
	animation: fb-pulse 1.8s ease-in-out infinite;
}

/* Full Time — same badge shape as the Live one, but a static, muted
   fill (--sunk/--ink2, already used for the crest fallback elsewhere on
   this card) instead of --accent, and no .fb-dot child, so it never
   pulses. No new colors, no new markup pattern. */
.fb-live-badge--final {
	background: var(--sunk);
	color: var(--ink2);
}

.fb-live-minute {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	color: var(--ink2);
}

.fb-live-card-teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 14px;
}

.fb-live-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
	text-align: center;
}

.fb-live-crest {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--sunk);
	border-radius: 999px;
	overflow: hidden;
	font-size: 14px;
	font-weight: 800;
	color: var(--ink2);
	flex: 0 0 auto;
}

.fb-live-crest img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fb-live-team-name {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--ink);
}

.fb-live-score {
	padding: 0 8px;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 800;
	letter-spacing: -.03em;
	color: var(--ink);
	white-space: nowrap;
}

@media (max-width: 480px) {
	.fb-live-crest {
		width: 34px;
		height: 34px;
		font-size: 12px;
	}
	.fb-live-team-name {
		font-size: 11px;
	}
	.fb-live-score {
		font-size: 24px;
		padding: 0 4px;
	}
	.fb-live-card-teams {
		gap: 8px;
	}
}

/* Goal scorers — compact list beneath the score/team row. Reuses the
   card's existing rule/ink2 tokens only; omitted entirely by the
   template when there are no goals, so no empty-state rule is needed
   here. */

.fb-live-goals {
	list-style: none;
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--rule);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fb-live-goal {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: -.005em;
	color: var(--ink2);
}

/* Side-mapping hotfix: page-live.php already computes the correct
   fb-live-goal--home/--away modifier from the stored goal's 'team'
   value, but no rule ever used it, so every goal rendered identically
   regardless of which side actually scored. Aligning left/right mirrors
   the existing home-left/away-right convention already established by
   .fb-live-card-teams above — no new markup, no score/crest/badge change. */
.fb-live-goal--home {
	text-align: left;
}

.fb-live-goal--away {
	text-align: right;
}

/* ---------- Competitions archive grid ---------- */

.fb-competition-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px;
}

.fb-competition-card {
	display: block;
	background: var(--surface);
	border: 1px solid var(--rule);
	padding: 22px;
	transition: border-color .2s ease, transform .2s ease;
}

.fb-competition-card:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
	color: inherit;
}

.fb-competition-card-mono {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 32px;
	padding: 0 9px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
	margin-bottom: 22px;
}

.fb-competition-card-name {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -.025em;
	color: var(--ink);
	margin-bottom: 6px;
}

.fb-competition-card-meta {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	color: var(--ink2);
}
