/**
 * Al-Hadaf — Match page (/match/{date}/{id}/)
 *
 * @package Alhadaf
 */

.alh-mp {
	--mp-ink: var(--alhadaf-header-bg, #0b132b);
	--mp-accent: var(--alhadaf-accent, #e63946);
	--mp-live: var(--alhadaf-live, #ef4444);
	--mp-surface: var(--alhadaf-surface, #fff);
	--mp-line: var(--alhadaf-border, #e2e8f0);
	--mp-muted: var(--alhadaf-text-light, #64748b);
	--mp-text: var(--alhadaf-text-main, #0f172a);

	padding: 22px 0 56px;
	background: var(--alhadaf-bg, #f4f6fa);
	color: var(--mp-text);
}

.alh-mp *,
.alh-mp *::before,
.alh-mp *::after {
	box-sizing: border-box;
}

.alh-mp-container {
	width: 100%;
	max-width: var(--container-max, 1320px);
	margin-inline: auto;
	padding-inline: var(--container-padding, 20px);
}

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

.alh-mp-crumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 16px;
	font-size: 12px;
	color: var(--mp-muted);
}

.alh-mp-crumbs a {
	color: var(--mp-text);
	text-decoration: none;
	font-weight: 600;
}

.alh-mp-crumbs a:hover {
	color: var(--mp-accent);
}

.alh-mp-crumbs [aria-current] {
	color: var(--mp-muted);
	font-weight: 600;
	max-width: 42ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Hero ------------------------------------------------------------------ */

.alh-mp-hero {
	position: relative;
	padding: 24px 26px 22px;
	border-radius: 22px;
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(800px 320px at 86% -20%, rgba(230, 57, 70, 0.34), transparent 62%),
		linear-gradient(135deg, var(--mp-ink) 0%, #162345 58%, #1c2d57 100%);
	box-shadow: 0 22px 50px rgba(11, 19, 43, 0.22);
}

.alh-mp-hero-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.alh-mp-league {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12.5px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
}

.alh-mp-league small {
	font-size: 11px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.55);
}

.alh-mp-league-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mp-accent);
}

.alh-mp-status {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.16);
	font-size: 11.5px;
	font-weight: 800;
	color: #fff;
	white-space: nowrap;
}

.alh-mp-status.is-live {
	background: rgba(239, 68, 68, 0.18);
	border-color: rgba(239, 68, 68, 0.45);
}

.alh-mp-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--mp-live);
	animation: alh-mp-pulse 1.6s ease-out infinite;
}

@keyframes alh-mp-pulse {
	0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
	70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
	100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.alh-mp-title {
	margin: 0 0 6px;
	font-size: clamp(21px, 2.2vw, 30px);
	font-weight: 800;
	line-height: 1.35;
	color: #fff;
}

.alh-mp-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.66);
}

.alh-mp-meta-dot {
	opacity: 0.5;
}

/* Scoreboard ------------------------------------------------------------ */

.alh-mp-scoreboard {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 18px;
	padding: 18px 10px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.alh-mp-team {
	display: grid;
	justify-items: center;
	gap: 8px;
	min-width: 0;
	text-align: center;
}

.alh-mp-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	overflow: hidden;
}

.alh-mp-logo img {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.alh-mp-team strong {
	font-size: clamp(13px, 1.2vw, 16px);
	font-weight: 800;
	color: #fff;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.alh-mp-score {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 120px;
	padding: 6px 16px;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.28);
	font-variant-numeric: tabular-nums;
}

.alh-mp-score-num {
	font-size: 34px;
	font-weight: 800;
	color: #fff;
	line-height: 1;
}

.alh-mp-score-sep {
	font-size: 22px;
	color: rgba(255, 255, 255, 0.45);
}

.alh-mp-score-time {
	font-size: 24px;
	font-weight: 800;
	color: #fff;
	letter-spacing: 0.02em;
}

.alh-mp-hero.is-live .alh-mp-score {
	background: var(--mp-live);
	box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

/* Actions --------------------------------------------------------------- */

.alh-mp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.alh-mp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 14px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.alh-mp-btn:hover {
	background: var(--mp-accent);
	border-color: var(--mp-accent);
	color: #fff;
	transform: translateY(-1px);
}

.alh-mp-btn--primary {
	background: var(--mp-accent);
	border-color: var(--mp-accent);
}

.alh-mp-btn--primary:hover {
	background: var(--alhadaf-accent-hover, #d62828);
	border-color: var(--alhadaf-accent-hover, #d62828);
}

/* Hub ------------------------------------------------------------------- */

.alh-mp-hub {
	margin-top: 22px;
}

.alh-mp-hub-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.45;
	color: var(--mp-text);
}

.alh-mp-hub-title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 16px;
	margin-inline-end: 8px;
	border-radius: 4px;
	background: var(--mp-accent);
	vertical-align: -2px;
}

.alh-mp-hub .kora-hub-wrap {
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Sections -------------------------------------------------------------- */

.alh-mp-section {
	margin-top: 26px;
}

.alh-mp-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--mp-line);
}

.alh-mp-section-head h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	color: var(--mp-text);
}

.alh-mp-section-head h2::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 16px;
	margin-inline-end: 8px;
	border-radius: 4px;
	background: var(--mp-accent);
	vertical-align: -2px;
}

/* Articles -------------------------------------------------------------- */

.alh-mp-articles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
}

.alh-mp-article {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 14px;
	background: var(--mp-surface);
	border: 1px solid var(--mp-line);
	text-decoration: none;
	color: var(--mp-text);
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.alh-mp-article:hover {
	border-color: var(--mp-accent);
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.alh-mp-article-thumb {
	flex: 0 0 96px;
	width: 96px;
	height: 64px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--alhadaf-bg-alt, #eaeff6);
}

.alh-mp-article-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.alh-mp-article-copy {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.alh-mp-article-copy strong {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.alh-mp-article-copy small {
	font-size: 11px;
	color: var(--mp-muted);
}

/* Related matches ------------------------------------------------------- */

.alh-mp-related {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.alh-mp-related a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--mp-surface);
	border: 1px solid var(--mp-line);
	text-decoration: none;
	color: var(--mp-text);
	font-size: 12.5px;
	font-weight: 700;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.alh-mp-related a:hover {
	border-color: var(--mp-accent);
}

.alh-mp-related-teams {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.alh-mp-related-score {
	flex: 0 0 auto;
	padding: 3px 9px;
	border-radius: 8px;
	background: var(--mp-ink);
	color: #fff;
	font-size: 11.5px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

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

.alh-mp-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 28px;
	padding: 18px 20px;
	border-radius: 16px;
	background:
		radial-gradient(400px 160px at 100% 0%, rgba(230, 57, 70, 0.16), transparent 70%),
		linear-gradient(120deg, var(--mp-ink), #1c2d57);
	color: #fff;
}

.alh-mp-cta p {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.78);
}

/* Embedded block inside a chosen destination (page/post/category) */

.alh-mp--embed {
	padding: 18px 0;
	background: transparent;
}

.alh-mp--embed .alh-mp-embed-inner {
	display: grid;
	gap: 16px;
}

.alh-mp--embed .alh-mp-hero {
	border-radius: 18px;
	box-shadow: 0 14px 34px rgba(11, 19, 43, 0.18);
}

.alh-mp--embed .alh-mp-hub {
	margin-top: 0;
}

.alh-mp-embed-cta {
	display: flex;
	justify-content: flex-start;
}

.alh-mp--embed .alh-mp-embed-cta .alh-mp-btn {
	border-color: var(--mp-accent);
	background: var(--mp-accent);
	color: #fff;
}

.alh-mp--embed .alh-mp-embed-cta .alh-mp-btn:hover {
	background: var(--alhadaf-accent-hover, #d62828);
	border-color: var(--alhadaf-accent-hover, #d62828);
}

/* Full-width block above archive content */

.alh-mp--block {
	padding: 22px 0 10px;
	background: var(--alhadaf-bg, #f4f6fa);
}

.alh-mp--block .alh-mp-container {
	display: grid;
	gap: 14px;
}

.alh-mp--inloop {
	grid-column: 1 / -1;
	width: 100%;
}

.alh-mp-block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--mp-line);
}

.alh-mp-block-title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: var(--mp-text);
	line-height: 1.4;
}

.alh-mp-block-title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 16px;
	margin-inline-end: 8px;
	border-radius: 4px;
	background: var(--mp-accent);
	vertical-align: -2px;
}

.alh-mp-block-more {
	display: inline-flex;
	align-items: center;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--mp-line);
	background: var(--mp-surface);
	color: var(--mp-text);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.alh-mp-block-more:hover {
	background: var(--mp-accent);
	border-color: var(--mp-accent);
	color: #fff;
}

/* Missing --------------------------------------------------------------- */

.alh-mp--missing {
	min-height: 60vh;
	display: grid;
	align-items: center;
}

.alh-mp-missing-card {
	max-width: 560px;
	margin-inline: auto;
	padding: 40px 28px;
	border-radius: 20px;
	background: var(--mp-surface);
	border: 1px solid var(--mp-line);
	text-align: center;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.alh-mp-missing-card span {
	font-size: 38px;
}

.alh-mp-missing-card h1 {
	margin: 10px 0 8px;
	font-size: 21px;
	font-weight: 800;
	color: var(--mp-text);
}

.alh-mp-missing-card p {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--mp-muted);
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 760px) {
	.alh-mp {
		padding-top: 14px;
	}

	.alh-mp--block {
		padding: 14px 0 6px;
	}

	.alh-mp-block-head {
		flex-wrap: wrap;
		gap: 8px;
	}

	.alh-mp-block-title {
		font-size: 15.5px;
	}

	.alh-mp-hero {
		padding: 18px 16px;
		border-radius: 18px;
	}

	.alh-mp-hero-top {
		flex-wrap: wrap;
		gap: 8px;
	}

	.alh-mp-scoreboard {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		gap: 8px;
		padding: 14px 6px;
	}

	.alh-mp-logo {
		width: 46px;
		height: 46px;
		border-radius: 12px;
	}

	.alh-mp-logo img {
		width: 34px;
		height: 34px;
	}

	.alh-mp-score {
		min-width: 86px;
		padding: 5px 10px;
	}

	.alh-mp-score-num {
		font-size: 26px;
	}

	.alh-mp-score-time {
		font-size: 18px;
	}

	.alh-mp-team strong {
		font-size: 12.5px;
	}

	.alh-mp-actions {
		gap: 6px;
	}

	.alh-mp-btn {
		flex: 1 1 auto;
		font-size: 11.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.alh-mp *,
	.alh-mp *::before,
	.alh-mp *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}

/* Dark theme ------------------------------------------------------------ */

[data-theme="dark"] .alh-mp {
	background: var(--alhadaf-primary, #0f172a);
}

[data-theme="dark"] .alh-mp-article,
[data-theme="dark"] .alh-mp-related a,
[data-theme="dark"] .alh-mp-missing-card {
	background: var(--alhadaf-header-card, #162345);
	border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .alh-mp-article,
[data-theme="dark"] .alh-mp-related a,
[data-theme="dark"] .alh-mp-missing-card h1,
[data-theme="dark"] .alh-mp-section-head h2 {
	color: #f8fafc;
}
