/* ClubData Connector - basisstyling (eigen, minimalistisch ontwerp) */

.cdc-container {
	margin: 1em 0;
	overflow-x: auto;
	/* Vaste basis-tekstgrootte, onafhankelijk van het thema: voorkomt dat
	   de inhoud onleesbaar klein wordt op sites met een kleine basisfont. */
	font-size: 16px;
	line-height: 1.4;
}

.cdc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.cdc-table th,
.cdc-table td {
	padding: 0.5em 0.75em;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
}

.cdc-table th {
	background: #f6f6f6;
	font-weight: 600;
}

.cdc-table tr.cdc-afgelast {
	color: #b91c1c;
}

.cdc-empty {
	color: #666;
	font-style: italic;
}

.cdc-club-logo {
	display: inline-block;
	width: 20px;
	height: 20px;
	object-fit: contain;
	vertical-align: middle;
	margin-right: 0.4em;
}

.cdc-club-logo-groot {
	width: 48px;
	height: 48px;
	margin: 0 0 0.4em;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.cdc-team-with-logo {
	display: inline-flex;
	align-items: center;
}

.cdc-poule-title {
	margin-top: 1.5em;
}

.cdc-tab-nav {
	display: flex;
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
	border-bottom: 2px solid #e0e0e0;
	flex-wrap: wrap;
}

.cdc-tab-nav li {
	margin: 0;
}

.cdc-tab-link {
	display: inline-block;
	padding: 0.6em 1.1em;
	text-decoration: none;
	color: #333;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.cdc-tab-link.cdc-active {
	border-bottom-color: #2a2a2a;
	font-weight: 600;
}

.cdc-tab-panel {
	display: none;
}

.cdc-tab-panel.cdc-active {
	display: block;
}

.cdc-team-switcher select {
	margin-bottom: 1em;
	padding: 0.4em;
}

.cdc-loading {
	color: #666;
}

.cdc-wedstrijd-kaart {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1em;
	margin: 1em 0;
	text-align: center;
}

.cdc-kaart-titel {
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
	margin-bottom: 0.5em;
}

.cdc-kaart-teams {
	font-size: 1.1em;
	display: flex;
	justify-content: center;
	gap: 0.75em;
	align-items: center;
	flex-wrap: wrap;
}

.cdc-kaart-teams .cdc-thuisteam,
.cdc-kaart-teams .cdc-uitteam {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 9em;
}

.cdc-uitslag {
	font-weight: 700;
	font-size: 14px;
	padding: 0.2em 0.6em;
	border-radius: 999px;
	background: #eef1f6;
}

.cdc-uitslag.cdc-match-score-winst {
	background: #dcfce7;
	color: #166534;
}

.cdc-uitslag.cdc-match-score-verlies {
	background: #fee2e2;
	color: #991b1b;
}

.cdc-uitslag.cdc-match-score-gelijk {
	background: #e5e7eb;
	color: #374151;
}

.cdc-kaart-datum {
	margin-top: 0.5em;
	color: #666;
	font-size: 0.9em;
}

/* ==== Wedstrijdregels: programma / uitslagen / afgelastingen / scheidsrechters / poule-programma / pouleuitslagen ==== */

/*
 * Vanaf hier met !important en dubbel-gekwalificeerde selectors: dit blok
 * moet zijn eigen layout kunnen afdwingen ongeacht de CSS van het
 * WordPress-thema waarin het wordt geplaatst (sommige thema's resetten
 * display/tekstuitlijning op alle <div>'s binnen de content).
 */

.cdc-matches {
	display: flex !important;
	flex-direction: column !important;
}

.cdc-matches .cdc-match-row {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	padding: 0.55em 0.5em;
	border-bottom: 1px solid #e9e9e9;
}

.cdc-match-row:nth-child(even) {
	background: #fafafa;
}

.cdc-match-row.cdc-afgelast {
	background: #fdf2f2;
}

/* Datum en tijd als twee eigen, vaste-breedte kolommen naast elkaar (niet
   meer gestapeld) — zo lijnen ze als echte kolommen onder elkaar uit en
   blijft de regel compact in hoogte. */
.cdc-matches .cdc-match-date {
	flex: 0 0 auto;
	display: flex !important;
	flex-direction: row;
	gap: 0.5em;
	width: 5.6em;
	font-size: 0.85em;
	color: #666;
}

.cdc-match-date-dag {
	display: inline-block;
	min-width: 2.6em;
	font-weight: 700;
	color: #333;
	font-size: 1em;
}

.cdc-match-date-tijd {
	display: inline-block;
	min-width: 2.4em;
	font-size: 0.95em;
}

.cdc-matches .cdc-match-teams {
	flex: 1 1 auto;
	min-width: 0;
	display: grid !important;
	/* Gelijke, vaste breedte voor thuis/uit: garandeert dat het uitteam
	   altijd tegen de rechterrand uitlijnt, ongeacht de lengte van namen.
	   Elke kolom is even breed, dus "flex-end" in de uit-kolom komt altijd
	   op dezelfde rechterrand uit als de andere regels. */
	grid-template-columns: 1fr auto 1fr !important;
	align-items: center;
	gap: 0.6em;
	width: 100%;
}

.cdc-matches .cdc-match-team {
	min-width: 0;
	display: flex !important;
	align-items: center;
	gap: 0.5em;
	font-size: 1.05em;
	line-height: 1.3;
	width: 100%;
}

.cdc-match-team-naam {
	overflow-wrap: break-word;
}

.cdc-match-team .cdc-club-logo {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	margin: 0;
}

.cdc-matches .cdc-match-thuis {
	justify-content: flex-start !important;
	text-align: left !important;
}

.cdc-matches .cdc-match-uit {
	justify-content: flex-end !important;
	text-align: right !important;
	flex-direction: row-reverse !important;
}

.cdc-matches .cdc-match-score {
	flex: 0 0 auto;
	min-width: 2.8em;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	background: #eef1f6;
	color: #333;
	border-radius: 999px;
	padding: 0.3em 0.65em;
}

/* Winst/verlies/gelijk voor de eigen vereniging.
   Let op: deze selectors moeten minimaal zo specifiek zijn als
   ".cdc-matches .cdc-match-score" hierboven (2 classes) — anders wint de
   grijze basiskleur altijd, ongeacht de volgorde in dit bestand. */
.cdc-matches .cdc-match-score.cdc-match-score-winst {
	background: #dcfce7 !important;
	color: #166534 !important;
}

.cdc-matches .cdc-match-score.cdc-match-score-verlies {
	background: #fee2e2 !important;
	color: #991b1b !important;
}

.cdc-matches .cdc-match-score.cdc-match-score-gelijk {
	background: #e5e7eb !important;
	color: #374151 !important;
}

.cdc-match-tijd {
	font-weight: 600;
	color: #333;
}

/* Wrapper rond de uitslag/status/vs; bij uitslagen (cdc-geen-tijd) staat
   hier ook de datum los boven, gecentreerd in dezelfde kolom. */
.cdc-matches .cdc-match-score-blok {
	flex: 0 0 auto;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 0.2em;
}

.cdc-match-datum-boven {
	font-size: 0.8em;
	font-weight: 600;
	color: #777;
	white-space: nowrap;
}

.cdc-match-status {
	flex: 0 0 auto;
	font-size: 0.85em;
	font-weight: 700;
	color: #b91c1c;
	text-align: center;
}

.cdc-match-vs {
	flex: 0 0 auto;
	color: #999;
	font-size: 0.9em;
	padding: 0 0.4em;
}

.cdc-match-toggle {
	flex: 0 0 auto;
	width: 1.8em;
	height: 1.8em;
	display: flex !important;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 999px;
	color: #888;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease;
}

.cdc-match-toggle:hover,
.cdc-match-toggle:focus-visible {
	background: #eef1f6;
	color: #333;
}

.cdc-match-row.cdc-open .cdc-match-toggle {
	transform: rotate(180deg);
}

.cdc-match-meta {
	display: none;
	flex-basis: 100%;
	margin-top: 0.4em;
	font-size: 0.85em;
	color: #777;
	padding-left: calc(5.6em + 0.6em);
}

.cdc-match-row.cdc-open .cdc-match-meta {
	display: block;
}

/* Zonder datumkolom (uitslagen) is er geen vaste linkerbreedte meer om
   de detailregel op uit te lijnen. */
.cdc-match-row.cdc-geen-tijd .cdc-match-meta {
	padding-left: 0;
}

/* ==== Uitslagen: gecentreerd in plaats van van-rand-tot-rand uitgelijnd ====
   Leest rustiger, vooral in een smalle sidebar-widget waar team­namen van
   wisselende lengte de "1fr auto 1fr"-verdeling per rij net iets anders
   laten uitpakken. */
.cdc-match-row.cdc-geen-tijd {
	position: relative;
	justify-content: center !important;
}

.cdc-match-row.cdc-geen-tijd.cdc-has-meta {
	padding-right: 2.2em;
}

.cdc-matches .cdc-match-row.cdc-geen-tijd .cdc-match-teams {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5em;
	width: auto;
	flex: 0 1 auto;
}

.cdc-match-row.cdc-geen-tijd .cdc-match-team {
	width: auto;
	flex: 0 1 auto;
	max-width: 9em;
}

.cdc-match-row.cdc-geen-tijd .cdc-match-thuis {
	justify-content: flex-end !important;
	text-align: right !important;
}

.cdc-match-row.cdc-geen-tijd .cdc-match-uit {
	flex-direction: row !important;
	justify-content: flex-start !important;
	text-align: left !important;
}

.cdc-match-row.cdc-geen-tijd .cdc-match-team-naam {
	font-size: 14px;
}

.cdc-match-row.cdc-geen-tijd .cdc-match-toggle {
	position: absolute;
	right: 0.3em;
	top: 50%;
	transform: translateY(-50%);
}

.cdc-match-row.cdc-geen-tijd.cdc-open .cdc-match-toggle {
	transform: translateY(-50%) rotate(180deg);
}

@media (max-width: 420px) {
	.cdc-match-row {
		gap: 0.4em;
	}
	.cdc-matches .cdc-match-date {
		width: 100%;
		order: -1;
		margin-bottom: 0.3em;
	}
	.cdc-match-team .cdc-club-logo {
		width: 22px;
		height: 22px;
	}
	.cdc-match-team {
		font-size: 0.95em;
	}
	.cdc-match-meta {
		padding-left: 0;
	}
}
