/*
 * MemTCG Agenda - Weekschema v2.4.0
 * ----------------------------------
 * Homepage-widget [memtcg_weekschema]: vaste toernooiavonden per spel.
 * Gescoped op .mtw-section. Tokens komen uit memtcg-global (:root).
 * Knop .mtw-wa volgt de groene .mta-wa uit de agenda.
 */

.mtw-section {
	padding: 60px 0;
	color: var(--c-text-strong);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
}
.mtw-section *,
.mtw-section *::before,
.mtw-section *::after {
	box-sizing: border-box;
}
.mtw-section .mtw-container {
	max-width: 1192px;
	margin: 0 auto;
	padding: 0 24px;
}
.mtw-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Vangnet tegen wpautop (zie MTA_Shortcode::clean_output) */
.mtw-section p:empty {
	display: none;
	margin: 0;
}

/* ---------- Kop ---------- */

.mtw-head {
	text-align: center;
	margin-bottom: 26px;
}
.mtw-section .mtw-title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--c-text-strong);
}
.mtw-section .mtw-sub {
	margin: 10px 0 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--c-text-muted);
}

/* ---------- Spel-panelen ---------- */

.mtw-games {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
/* Een enkel paneel niet uitrekken over de hele breedte */
.mtw-games > .mtw-game:only-child {
	grid-column: 1 / -1;
	width: 100%;
	max-width: 584px;
	margin: 0 auto;
}

.mtw-game {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 26px 26px 0;
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	background:
		radial-gradient(ellipse 60% 80% at 100% 0%, rgba(37, 150, 190, 0.07) 0%, transparent 75%),
		linear-gradient(135deg, #151515 0%, #0e0e0e 60%, #121212 100%);
	transition: border-color var(--t-med);
}

.mtw-game-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 72px;
}
.mtw-section .mtw-game-logo {
	display: block;
	width: auto;
	max-width: 62%;
	height: auto;
	transition: transform var(--t-med);
}
.mtw-section .mtw-game-logo--compact {
	max-height: 72px;
}
.mtw-section .mtw-game-logo--wide {
	max-height: 44px;
}
.mtw-game-name {
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 700;
	color: var(--c-text-strong);
}
.mtw-game-kind {
	flex-shrink: 0;
	text-align: right;
}
.mtw-game-kind span {
	display: block;
	margin-bottom: 4px;
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--c-text-faint);
}
.mtw-game-kind strong {
	display: block;
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.3px;
	color: var(--c-text-strong);
}

/* Speeldagen in tekst, direct boven de weekbalk */
.mtw-section .mtw-game-when {
	margin: 0 0 -10px;
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--c-text-strong);
}

/* Weekbalk: 7 dagen, speeldagen lichten op */
.mtw-section .mtw-week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mtw-section .mtw-week li {
	display: grid;
	place-items: center;
	height: 44px;
	margin: 0;
	padding: 0;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.22);
	border: 1px solid var(--c-line-soft);
	border-radius: var(--r-md);
	list-style: none;
}
.mtw-section .mtw-week li::before,
.mtw-section .mtw-week li::marker {
	content: none;
}
.mtw-section .mtw-week li.is-on {
	color: var(--c-accent-soft);
	background: var(--c-accent-tint);
	border-color: rgba(37, 150, 190, 0.45);
}
/* Vandaag en er wordt gespeeld */
.mtw-section .mtw-week li.is-on.is-today {
	color: #FFF;
	background: var(--c-accent);
	border-color: var(--c-accent);
	box-shadow: 0 0 18px var(--c-accent-glow);
}

/* Voet: eerstvolgende datum */
.mtw-game-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 -26px;
	padding: 15px 26px;
	border-top: 1px solid var(--c-line);
	background: rgba(0, 0, 0, 0.25);
}
.mtw-next-label {
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--c-text-faint);
}
.mtw-next {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--c-text-strong);
}
.mtw-next-time {
	margin-left: 0.3em;
	color: var(--c-accent-soft);
}

/* Paneel waar vandaag gespeeld wordt: alleen een blauwe rand */
.mtw-game.is-tonight {
	border-color: rgba(37, 150, 190, 0.55);
}

/* Hover: rand licht op, logo schuift 2px omhoog. Alleen met muis. */
@media (hover: hover) and (pointer: fine) {
	.mtw-game:hover {
		border-color: rgba(37, 150, 190, 0.3);
	}
	.mtw-game.is-tonight:hover {
		border-color: var(--c-accent-line);
	}
	.mtw-section .mtw-game:hover .mtw-game-logo {
		transform: translateY(-2px);
	}
}

/* ---------- Community ---------- */

.mtw-join {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 12px;
	padding: 18px 20px;
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	background: rgba(255, 255, 255, 0.015);
}
.mtw-section .mtw-join-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--c-text-muted);
}
.mtw-join-text strong {
	display: block;
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--c-text-strong);
}

.mtw-section .mtw-wa {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	padding: 11px 18px;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #4ADE80;
	text-decoration: none;
	background: rgba(74, 222, 128, 0.05);
	border: 1px solid rgba(74, 222, 128, 0.4);
	border-radius: 6px;
	transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.mtw-section .mtw-wa:hover,
.mtw-section .mtw-wa:focus-visible {
	color: #4ADE80;
	background: rgba(74, 222, 128, 0.12);
	border-color: rgba(74, 222, 128, 0.7);
	transform: translateY(-1px);
	text-decoration: none;
}
.mtw-wa svg {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

/* ---------- Extra evenementen ---------- */

.mtw-section .mtw-extra {
	display: flex;
	align-items: center;
	gap: 8px;
	width: max-content;
	margin: 18px auto 0;
	padding: 8px 16px;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.3px;
	color: var(--c-accent-soft);
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid rgba(116, 182, 210, 0.4);
	border-radius: var(--r-pill);
	transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mtw-section .mtw-extra:hover,
.mtw-section .mtw-extra:focus-visible {
	color: #FFF;
	background: rgba(37, 150, 190, 0.15);
	border-color: rgba(116, 182, 210, 0.7);
	text-decoration: none;
}
.mtw-extra-count {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	color: #0C0C0C;
	background: var(--c-accent-soft);
	border-radius: var(--r-pill);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
	.mtw-games {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.mtw-section {
		padding: 40px 0;
	}
	.mtw-section .mtw-container {
		padding: 0 16px;
	}
	.mtw-head {
		margin-bottom: 18px;
	}
	.mtw-section .mtw-title {
		font-size: 23px;
	}
	.mtw-section .mtw-sub {
		font-size: 13.5px;
	}

	.mtw-game {
		gap: 18px;
		padding: 20px 18px 0;
	}
	.mtw-game-top {
		height: 56px;
	}
	.mtw-section .mtw-game-logo--compact {
		max-height: 56px;
	}
	.mtw-section .mtw-game-logo--wide {
		max-height: 32px;
	}
	.mtw-game-kind strong {
		font-size: 22px;
	}
	.mtw-section .mtw-game-when {
		font-size: 14px;
		margin-bottom: -6px;
	}
	.mtw-section .mtw-week {
		gap: 4px;
	}
	.mtw-section .mtw-week li {
		height: 38px;
		font-size: 11px;
	}
	.mtw-game-foot {
		margin: 0 -18px;
		padding: 13px 18px;
	}

	.mtw-join {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}
	.mtw-section .mtw-join-text {
		font-size: 13.5px;
	}
	.mtw-section .mtw-wa {
		justify-content: center;
		padding: 13px 18px;
	}

	.mtw-section .mtw-extra {
		justify-content: center;
		width: 100%;
		margin-top: 10px;
		padding: 13px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mtw-section .mtw-wa:hover,
	.mtw-section .mtw-game:hover .mtw-game-logo {
		transform: none;
	}
}
