/* ==========================================================================
   Lovers — Componenti del design system + effetti signature
   ========================================================================== */

/* --- Breadcrumb ------------------------------------------------------------- */

.fcla-breadcrumb {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding-block: var(--space-4);
	font-size: var(--text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.fcla-breadcrumb a {
	color: var(--brand);
	text-decoration: none;
}

.fcla-breadcrumb a:hover {
	text-decoration: underline;
}

/* --- Effetti signature ------------------------------------------------------ */

/* Grain: texture sopra gradienti e foto */
.fcla-grain {
	position: relative;
}

.fcla-grain::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--grain-url);
	background-size: 160px 160px;
	mix-blend-mode: overlay;
	opacity: 0.4;
	pointer-events: none;
	border-radius: inherit;
}

/* Spotlight radiale da stadio */
.fcla-spotlight::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--spotlight);
	pointer-events: none;
}

/* Decoro a quadrati ruotati */
.fcla-squares {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.fcla-squares span {
	position: absolute;
	border: var(--border-hairline) solid rgba(255, 255, 255, 0.14);
	width: 180px;
	height: 180px;
}

.fcla-squares span:nth-child(1) { top: -60px; right: 10%; transform: rotate(18deg); }
.fcla-squares span:nth-child(2) { bottom: -40px; right: 24%; width: 120px; height: 120px; transform: rotate(-12deg); }
.fcla-squares span:nth-child(3) { top: 30%; left: -50px; width: 220px; height: 220px; transform: rotate(30deg); }

/* Reveal on scroll */
[data-lovers-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

[data-lovers-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

/* --- Button --------------------------------------------------------------------- */

.fcla-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-5);
	background: var(--brand);
	color: var(--on-brand);
	font-weight: 800;
	font-size: var(--text-sm);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: var(--border-base) solid var(--brand);
	border-radius: var(--radius-pill);
	transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-snap), box-shadow var(--dur-fast) var(--ease-out);
}

.fcla-btn:hover {
	background: var(--brand-strong);
	border-color: var(--brand-strong);
	color: var(--on-brand);
	box-shadow: var(--shadow-gold);
	transform: translateY(-1px);
}

.fcla-btn--dark {
	background: var(--ink-950);
	border-color: var(--ink-950);
	color: var(--text);
}

.fcla-btn--dark:hover {
	background: var(--ink-900);
	border-color: var(--ink-900);
	color: var(--brand);
	box-shadow: none;
}

.fcla-btn--secondary {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--text);
}

.fcla-btn--secondary:hover {
	background: transparent;
	border-color: var(--border-gold);
	color: var(--brand);
	box-shadow: none;
}

.fcla-btn--sm {
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-xs);
}

/* --- Card ------------------------------------------------------------------------- */

.fcla-card {
	background: var(--surface-card);
	border: var(--border-hairline) solid var(--border);
	border-radius: var(--radius-card);
	padding: var(--space-5);
}

.fcla-card--interactive {
	transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-snap), box-shadow var(--dur-base) var(--ease-out);
}

.fcla-card--interactive:hover {
	border-color: var(--border-strong);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.fcla-card--accent {
	border-left: var(--border-bold) solid var(--border-gold);
}

.fcla-card--matchday {
	background: var(--grad-matchday);
	border-color: transparent;
}

/* --- Badge ------------------------------------------------------------------------ */

.fcla-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px var(--space-3);
	border-radius: var(--radius-pill);
	font-size: var(--text-2xs);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.fcla-badge--gold {
	background: var(--brand);
	color: var(--on-brand);
}

.fcla-badge--outline {
	border: var(--border-hairline) solid var(--border-strong);
	color: var(--text-muted);
}

.fcla-badge--neutral {
	background: var(--surface-raised);
	color: var(--text-muted);
}

/* --- Avatar ------------------------------------------------------------------------ */

.fcla-avatar {
	--avatar-size: 56px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--avatar-size);
	height: var(--avatar-size);
	border-radius: 50%;
	overflow: hidden;
	background: var(--surface-raised);
	flex-shrink: 0;
}

.fcla-avatar--ring {
	border: var(--border-base) solid var(--border-gold);
}

.fcla-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fcla-avatar__initials {
	font-weight: 800;
	font-size: calc(var(--avatar-size) * 0.36);
	color: var(--brand);
}

/* --- Photo placeholder ------------------------------------------------------------- */

.fcla-placeholder {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border: var(--border-hairline) solid var(--border);
	border-radius: var(--radius-card);
	background: var(--surface);
	background-image: repeating-linear-gradient(
		-45deg,
		transparent 0 14px,
		rgba(255, 255, 255, 0.05) 14px 15px
	);
	overflow: hidden;
}

.fcla-placeholder.is-16x9 { aspect-ratio: 16 / 9; }
.fcla-placeholder.is-21x9 { aspect-ratio: 21 / 9; }
.fcla-placeholder.is-3x4  { aspect-ratio: 3 / 4; }
.fcla-placeholder.is-4x3  { aspect-ratio: 4 / 3; }
.fcla-placeholder.is-1x1  { aspect-ratio: 1 / 1; }

.fcla-placeholder__label {
	font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--text-subtle);
	border: var(--border-hairline) solid var(--border);
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-sm);
	background: var(--bg);
	max-width: 80%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --- ResultPill ----------------------------------------------------------------------- */

.fcla-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: var(--radius-sm);
	font-size: var(--text-2xs);
	font-weight: 800;
	color: var(--ink-950);
}

.fcla-pill--sm {
	width: 18px;
	height: 18px;
	font-size: 0.5625rem;
}

.fcla-pill--win  { background: var(--result-win); color: var(--ink-0); }
.fcla-pill--draw { background: var(--result-draw); }
.fcla-pill--loss { background: var(--result-loss); color: var(--ink-0); }

/* --- ScoreLine --------------------------------------------------------------------------- */

.fcla-scoreline__link,
.fcla-scoreline:not(:has(.fcla-scoreline__link)) {
	display: grid;
	grid-template-columns: 1fr auto 1fr auto;
	align-items: center;
	gap: var(--space-3);
}

.fcla-scoreline__team {
	font-weight: 700;
	font-size: var(--text-h3);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--text-muted);
	text-align: right;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fcla-scoreline__team.is-away {
	text-align: left;
}

/* Nomi avversari completi: a capo su max 2 righe invece di troncare. */
.fcla-result-row .fcla-scoreline__team {
	white-space: normal;
	text-overflow: clip;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

/* Chip squadra Lovers (Seconda Categoria, Over 35, Allievi…) */
.fcla-squad-chip {
	display: inline-block;
	padding: 3px 10px;
	border: var(--border-hairline) solid var(--brand);
	border-radius: 4px;
	background: var(--ink-950);
	color: var(--brand);
	font-size: var(--text-xs);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.fcla-scoreline__team.is-lovers {
	color: var(--text);
	font-weight: 900;
}

.fcla-scoreline__score {
	font-family: var(--font-display);
	font-size: var(--text-display-md);
	padding: 0 var(--space-3);
	color: var(--brand);
	white-space: nowrap;
}

.fcla-scoreline__time {
	font-family: var(--font-ui);
	font-weight: 800;
	font-size: var(--text-h3);
	color: var(--text-subtle);
}

/* --- MatchCard -------------------------------------------------------------------------------- */

.fcla-match-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.fcla-match-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
}

.fcla-match-card__tournament {
	margin: calc(var(--space-2) * -1) 0 0;
}

/* Nella card le squadre vanno in colonna (una per riga), orario/punteggio a destra:
   spazio pieno per il nome avversario, che può andare a capo. */
.fcla-match-card .fcla-scoreline__link,
.fcla-match-card .fcla-scoreline:not(:has(.fcla-scoreline__link)) {
	grid-template-columns: minmax(0, 1fr) auto auto;
	row-gap: var(--space-2);
}

.fcla-match-card .fcla-scoreline__team,
.fcla-match-card .fcla-scoreline__team.is-away {
	grid-column: 1;
	text-align: left;
	white-space: normal;
	text-overflow: clip;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.fcla-match-card .fcla-scoreline__score {
	grid-column: 2;
	grid-row: 1 / span 2;
	text-align: right;
}

.fcla-match-card .fcla-pill {
	grid-column: 3;
	grid-row: 1 / span 2;
}

.fcla-match-card__footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-3);
	border-top: var(--border-hairline) solid var(--border);
	padding-top: var(--space-4);
	margin-top: auto;
}

.fcla-match-card__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: var(--text-sm);
}

.fcla-match-card__date {
	font-weight: 700;
}

.fcla-match-card__venue {
	font-size: var(--text-xs);
}

.fcla-match-card__cta {
	font-size: var(--text-xs);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--brand);
	white-space: nowrap;
}

/* Card in evidenza: barra e bordo oro, testi sempre su fondo scuro (leggibili). */
.fcla-match-card.fcla-card--matchday {
	background: var(--ink-900);
	border-color: var(--brand);
	box-shadow: inset 0 4px 0 var(--brand);
}

/* --- Filtro squadra ------------------------------------------------------------------------- */

.fcla-squad-filter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-5);
}

.fcla-filter-chip {
	appearance: none;
	cursor: pointer;
	padding: 8px 16px;
	border: var(--border-hairline) solid var(--border);
	border-radius: 999px;
	background: transparent;
	color: var(--text-muted);
	font: inherit;
	font-size: var(--text-xs);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fcla-filter-chip:hover {
	border-color: var(--brand);
	color: var(--text);
}

.fcla-filter-chip.is-active {
	background: var(--brand);
	border-color: var(--brand);
	color: var(--ink-950);
}

[data-squadra][hidden],
[data-squad-group][hidden] {
	display: none !important;
}

/* --- Standings ------------------------------------------------------------------------------------ */

.fcla-standings {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-sm);
}

.fcla-standings th {
	text-align: left;
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-subtle);
	font-weight: 700;
	padding: var(--space-2) var(--space-3);
	border-bottom: var(--border-hairline) solid var(--border-strong);
}

.fcla-standings td {
	padding: var(--space-3);
	border-bottom: var(--border-hairline) solid var(--border);
}

.fcla-standing__pos {
	color: var(--text-subtle);
	width: 2.5em;
}

.fcla-standing__team {
	font-weight: 700;
}

.fcla-standing__pts {
	font-weight: 900;
}

.fcla-standing__form {
	white-space: nowrap;
}

.fcla-standing__form .fcla-pill {
	margin-right: 3px;
}

.fcla-standing.is-lovers {
	background: rgba(241, 215, 34, 0.07);
	box-shadow: inset var(--border-bold) 0 0 var(--border-gold);
}

.fcla-standing.is-lovers .fcla-standing__team {
	color: var(--brand);
	font-weight: 900;
}

@media (max-width: 860px) {
	.fcla-standings .fcla-standing__dr,
	.fcla-standings th:nth-child(7),
	.fcla-standings td:nth-child(4),
	.fcla-standings td:nth-child(5),
	.fcla-standings td:nth-child(6),
	.fcla-standings th:nth-child(4),
	.fcla-standings th:nth-child(5),
	.fcla-standings th:nth-child(6) {
		display: none;
	}
}

/* --- StatBlock --------------------------------------------------------------------------------------- */

.fcla-stat {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	padding: var(--space-4);
	border-left: var(--border-bold) solid var(--border-gold);
}

.fcla-stat__number {
	font-family: var(--font-display);
	font-size: var(--text-display-lg);
	line-height: 1;
	color: var(--text);
}

.fcla-stat__suffix {
	color: var(--brand);
}

.fcla-stat__label {
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-subtle);
	font-weight: 700;
}

/* --- PlayerCard ----------------------------------------------------------------------------------------- */

.fcla-player {
	position: relative;
}

.fcla-player__media {
	position: relative;
	margin-bottom: var(--space-3);
}

.fcla-player__number {
	position: absolute;
	right: var(--space-3);
	bottom: var(--space-2);
	font-family: var(--font-display);
	font-size: var(--text-display-lg);
	line-height: 1;
	color: var(--brand);
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.fcla-player__name {
	font-size: var(--text-body);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	margin: 0 0 2px;
}

.fcla-player__role {
	margin: 0;
}

/* --- Section heading -------------------------------------------------------------------------------------- */

.fcla-section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-5);
	margin-bottom: var(--space-6);
}

.fcla-section-heading h2 {
	margin: 0;
}

.fcla-section-heading__link {
	font-size: var(--text-xs);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--brand);
	white-space: nowrap;
	padding-bottom: var(--space-2);
}

/* --- CTA band ----------------------------------------------------------------------------------------------- */

.fcla-cta-band {
	position: relative;
	background: var(--grad-matchday);
	overflow: hidden;
	margin-top: var(--space-9);
}

.fcla-cta-band__inner {
	position: relative;
	z-index: 1;
	text-align: center;
	padding-block: var(--space-9);
}

.fcla-cta-band__eyebrow {
	color: var(--ink-950);
}

.fcla-cta-band .fcla-display {
	color: var(--ink-950);
}

.fcla-cta-band__text {
	max-width: 560px;
	margin: 0 auto var(--space-6);
	color: rgba(6, 6, 5, 0.8);
	font-weight: 500;
}
