/* Mondiali Live Widget — scoped .mlw, nessuna dipendenza dal tema. */

.mlw {
	--mlw-bg: #ffffff;
	--mlw-ink: #15233d;
	--mlw-muted: #69788f;
	--mlw-line: #e7ecf3;
	--mlw-soft: #f6f8fb;
	--mlw-accent: #0c7a4d;
	--mlw-navy-1: #0c1f3f;
	--mlw-navy-2: #14366b;
	--mlw-live: #e0234e;
	--mlw-gold: #d9a82e;

	background: var(--mlw-bg);
	color: var(--mlw-ink);
	border: 1px solid var(--mlw-line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 30, 60, .05), 0 4px 16px rgba(15, 30, 60, .06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.35;
	max-width: 100%;
	margin: 0 0 1.5em;
}

.mlw *, .mlw *::before, .mlw *::after { box-sizing: border-box; }
.mlw img { border: 0; max-width: none; }

/* ── Header ─────────────────────────────────────────── */
.mlw-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background:
		radial-gradient(120% 160% at 100% 0%, rgba(217, 168, 46, .28) 0%, rgba(217, 168, 46, 0) 45%),
		linear-gradient(130deg, var(--mlw-navy-1) 0%, var(--mlw-navy-2) 62%, #0d5a3c 135%);
	color: #fff;
}
.mlw-cup { font-size: 17px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.mlw-title {
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mlw-badge-live {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--mlw-live);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .08em;
	padding: 3px 8px;
	border-radius: 999px;
	box-shadow: 0 0 0 3px rgba(224, 35, 78, .25);
}
.mlw-badge-live::before {
	content: "";
	width: 6px; height: 6px;
	border-radius: 50%;
	background: #fff;
	animation: mlw-pulse 1.3s ease-in-out infinite;
}
.mlw-badge-live[hidden] { display: none; }

@keyframes mlw-pulse { 50% { opacity: .25; } }

/* ── Body / sezioni ─────────────────────────────────── */
.mlw-body { padding: 4px 0 2px; }
.mlw-empty { margin: 14px; color: var(--mlw-muted); text-align: center; font-size: 13px; }

.mlw-sec { border-bottom: 1px solid var(--mlw-line); padding: 8px 0 10px; }
.mlw-sec:last-child { border-bottom: 0; }
.mlw-sec[hidden] { display: none; }

.mlw-h {
	margin: 2px 14px 6px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .09em;
	color: var(--mlw-muted);
}
.mlw-sec--live .mlw-h { color: var(--mlw-live); }

/* ── Day group ──────────────────────────────────────── */
.mlw-dlabel {
	margin: 6px 14px 2px;
	font-size: 11px;
	font-weight: 700;
	color: var(--mlw-accent);
}
.mlw-day:first-child .mlw-dlabel { margin-top: 0; }

/* ── Match row ──────────────────────────────────────── */
.mlw-match {
	display: grid;
	grid-template-columns: 1fr minmax(64px, auto) 1fr;
	align-items: center;
	gap: 4px;
	padding: 7px 12px;
}
.mlw-match + .mlw-match { border-top: 1px dashed var(--mlw-line); }
.mlw-match.is-live {
	background: linear-gradient(90deg, rgba(224, 35, 78, .06), rgba(224, 35, 78, 0) 30% 70%, rgba(224, 35, 78, .06));
	box-shadow: inset 3px 0 0 var(--mlw-live);
}

.mlw-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 0;
	text-align: center;
}
.mlw-crest {
	width: 30px; height: 30px;
	object-fit: contain;
	border-radius: 50%;
	background: var(--mlw-soft);
	box-shadow: 0 0 0 1px var(--mlw-line);
	padding: 2px;
}
.mlw-crest--ph { display: inline-block; }
.mlw-crest--sm { width: 18px; height: 18px; padding: 1px; }
.mlw-tname {
	font-size: 11.5px;
	font-weight: 600;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mlw-mid {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 0 4px;
}
.mlw-big {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	font-size: 18px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: .01em;
}
.mlw-big i { font-style: normal; color: var(--mlw-muted); font-weight: 400; font-size: 14px; }
.mlw-big--time {
	font-size: 15px;
	font-weight: 700;
	color: var(--mlw-navy-2);
	background: var(--mlw-soft);
	border: 1px solid var(--mlw-line);
	border-radius: 8px;
	padding: 2px 8px;
}
.mlw-msub {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	font-weight: 600;
	color: var(--mlw-muted);
	white-space: nowrap;
}
.is-live .mlw-msub { color: var(--mlw-live); }
.mlw-livedot {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--mlw-live);
	animation: mlw-pulse 1.3s ease-in-out infinite;
}

/* ── Gironi / standings ─────────────────────────────── */
.mlw-gdet { border-top: 1px dashed var(--mlw-line); }
.mlw-gdet:first-child { border-top: 0; }
.mlw-gdet summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	padding: 8px 14px;
	font-size: 12.5px;
	font-weight: 700;
	user-select: none;
}
.mlw-gdet summary::-webkit-details-marker { display: none; }
.mlw-gdet summary::after {
	content: "";
	margin-left: auto;
	width: 7px; height: 7px;
	border-right: 2px solid var(--mlw-muted);
	border-bottom: 2px solid var(--mlw-muted);
	transform: rotate(45deg);
	transition: transform .18s ease;
}
.mlw-gdet[open] summary::after { transform: rotate(225deg); }
.mlw-gdet summary:hover { background: var(--mlw-soft); }

.mlw-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	margin: 0 0 6px;
}
.mlw-table th, .mlw-table td {
	padding: 4px 6px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	border: 0;
}
.mlw-table thead th {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--mlw-muted);
	border-bottom: 1px solid var(--mlw-line);
}
.mlw-table .c-team { text-align: left; width: 100%; }
.mlw-table td.c-team {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mlw-table td.c-team span { overflow: hidden; text-overflow: ellipsis; }
.mlw-table .c-pos { color: var(--mlw-muted); font-size: 11px; padding-left: 14px; }
.mlw-table .c-pts { font-weight: 800; padding-right: 14px; }
.mlw-table thead th:first-child { padding-left: 14px; }
.mlw-table thead th:last-child { padding-right: 14px; }
.mlw-table tr.is-q .c-pos {
	color: var(--mlw-accent);
	font-weight: 800;
	position: relative;
}
.mlw-table tr.is-q td:first-child { box-shadow: inset 3px 0 0 var(--mlw-accent); }

/* ── Footer ─────────────────────────────────────────── */
.mlw-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 14px;
	background: var(--mlw-soft);
	border-top: 1px solid var(--mlw-line);
	font-size: 10.5px;
	color: var(--mlw-muted);
}
.mlw-credit { opacity: .8; }

/* ── Layout largo (in-article) ──────────────────────── */
@media (min-width: 560px) {
	.mlw--wide-host .mlw-match, .mlw-match { grid-template-columns: 1fr minmax(84px, auto) 1fr; }
	.mlw-tname { font-size: 12.5px; }
	.mlw-big { font-size: 20px; }
}

/* ── Visibilità per breakpoint (768px = breakpoint tema GP) ── */
@media (max-width: 768px) {
	.mlw.mlw--only-desktop { display: none; }
}
@media (min-width: 769px) {
	.mlw.mlw--only-mobile { display: none; }
}

/* ── Banner orizzontale (home full-width, desktop) ──────────
   Su mobile resta la card verticale impilata. */
@media (min-width: 769px) {
	.mlw--banner .mlw-body { display: flex; align-items: stretch; padding: 4px 0 2px; }
	.mlw--banner .mlw-sec {
		flex: 1 1 0;
		min-width: 0;
		border-bottom: 0;
		border-right: 1px solid var(--mlw-line);
	}
	.mlw--banner .mlw-sec:last-child { border-right: 0; }
	.mlw--banner .mlw-sec[hidden] { display: none; }
	.mlw--banner .mlw-empty { flex: 1 1 100%; align-self: center; }
	/* Quando resta una sezione sola, niente righe stirate a tutta pagina. */
	.mlw--banner .mlw-h,
	.mlw--banner .mlw-sec-body { max-width: 540px; margin-left: auto; margin-right: auto; }
	.mlw--banner .mlw-h { margin-top: 2px; margin-bottom: 6px; padding: 0 14px; }
}
