/*
 * Fortuna UI — tabel. Vereist fu-tokens. Gedrag (zoeken, sorteren, filteren): assets/js/table.js.
 * Markup: <div class="fu-table-wrap"><table class="fu-table" data-fu-table>…</table></div>
 * Cellen: .fu-num (rechts, cijfers), .fu-strong, .fu-muted, .fu-zero (0 zacht).
 *
 * Thema's (Divi Extra) stylen elke <button> met hoge voorrang. Knoppen in dit onderdeel zetten daarom
 * hun kleur, achtergrond, rand en maat met !important — alleen binnen .fu-table / .fu-table__tools.
 */
.fu-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 2em; border-radius: var(--fu-radius-sm); }
.fu-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.4; color: var(--fu-text); }
.fu-table th, .fu-table td { padding: 9px 10px; border-bottom: 1px solid var(--fu-line); text-align: left; white-space: nowrap; }
.fu-table thead th { background: var(--fu-green); color: var(--fu-on-green); font-weight: 600; font-size: 13px; vertical-align: bottom; }
.fu-table tbody tr:nth-child(even) { background: var(--fu-surface); }
.fu-table tbody tr:hover { background: var(--fu-green-tint); }
.fu-table tfoot td { border-top: 2px solid var(--fu-green); font-weight: 700; }
.fu-table .fu-num { text-align: right; }
.fu-table .fu-strong { font-weight: 700; }
.fu-table .fu-muted { color: var(--fu-muted); }
.fu-table .fu-zero { color: #b9c8bd; }
.fu-table td a { color: var(--fu-green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.fu-table td a:hover { text-decoration-thickness: 2px; }

/* Sorteerbare kop: de hele kop is een knop (wit op groen, ook als het thema knoppen anders kleurt). */
.fu-table.fu-table thead th .fu-table__sort {
	all: unset;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center;
	gap: 5px;
	min-height: 28px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 4px;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--fu-on-green) !important;
	font: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
}
.fu-table.fu-table thead th .fu-table__sort::before { display: none !important; }
.fu-table.fu-table thead th.fu-num .fu-table__sort { justify-content: flex-end; width: 100%; }
.fu-table.fu-table thead th .fu-table__sort::after { content: "↕" !important; display: inline !important; position: static !important; margin: 0 !important; opacity: .55; font-size: 11px !important; color: inherit !important; }
.fu-table.fu-table thead th[aria-sort="ascending"] .fu-table__sort::after { content: "▲" !important; opacity: 1; }
.fu-table.fu-table thead th[aria-sort="descending"] .fu-table__sort::after { content: "▼" !important; opacity: 1; }
.fu-table.fu-table thead th .fu-table__sort:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.fu-table.fu-table thead th .fu-table__sort:focus-visible { outline: 3px solid var(--fu-on-green) !important; outline-offset: 2px; }

/* Werkbalk: zoeken links, keuzeknoppen, telling rechts. */
.fu-table__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.fu-table__sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.fu-table__search { position: relative; flex: 0 1 300px; min-width: 200px; }
.fu-table__search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--fu-muted); pointer-events: none; }
.fu-table__search input[type="search"] {
	box-sizing: border-box; width: 100%; height: 44px; margin: 0; padding: 0 42px 0 42px;
	border: 1px solid var(--fu-line); border-radius: 999px; background: #fff; color: var(--fu-text);
	font: inherit; font-size: 16px; line-height: 44px; -webkit-appearance: none; appearance: none; box-shadow: none;
	font-weight: 400 !important; text-transform: none !important; letter-spacing: normal !important;
}
.fu-table__search input[type="search"]::placeholder { color: var(--fu-muted) !important; opacity: 1; font-weight: 400 !important; text-transform: none !important; letter-spacing: normal !important; }
.fu-table__search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.fu-table__search input[type="search"]:focus-visible { outline: 3px solid var(--fu-focus); outline-offset: 1px; border-color: var(--fu-green); }
.fu-table__tools .fu-table__search-clear {
	position: absolute !important; right: 4px; top: 50%; transform: translateY(-50%);
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 36px !important; height: 36px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important;
	color: var(--fu-muted) !important; font-size: 20px !important; line-height: 1 !important; cursor: pointer;
}
.fu-table__tools .fu-table__search-clear::after, .fu-table__tools .fu-table__search-clear::before { display: none !important; }
.fu-table__tools .fu-table__search-clear:hover { background: var(--fu-surface) !important; color: var(--fu-text) !important; }
.fu-table__tools .fu-table__search-clear:focus-visible { outline: 3px solid var(--fu-focus) !important; outline-offset: 0; }
.fu-table__tools .fu-table__search-clear[hidden] { display: none !important; }

.fu-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; }
.fu-table__tools .fu-chip {
	box-sizing: border-box !important; display: inline-flex !important; align-items: center;
	min-height: 44px !important; margin: 0 !important; padding: 0 16px !important;
	border: 1px solid var(--fu-line) !important; border-radius: 999px !important;
	background: #fff !important; box-shadow: none !important;
	color: var(--fu-text) !important; font: inherit !important; font-size: 15px !important; font-weight: 500 !important;
	line-height: 1.2 !important; text-transform: none !important; letter-spacing: normal !important; white-space: nowrap; cursor: pointer;
}
.fu-table__tools .fu-chip::after, .fu-table__tools .fu-chip::before { display: none !important; }
.fu-table__tools .fu-chip:hover { border-color: var(--fu-green) !important; }
.fu-table__tools .fu-chip[aria-pressed="true"] { border-color: var(--fu-green) !important; background: var(--fu-green) !important; color: var(--fu-on-green) !important; }
.fu-table__tools .fu-chip:focus-visible { outline: 3px solid var(--fu-focus) !important; outline-offset: 2px; }

.fu-table__count { margin-left: auto; font-size: 14px; color: var(--fu-muted); white-space: nowrap; }
.fu-table__empty td { padding: 24px 10px; text-align: center; color: var(--fu-muted); }

/* Keuzelijst met vorige/volgende (bijv. seizoen): <form class="fu-select"> ‹ <select> › </form>. */
.fu-select-wrap { margin: 0 0 14px; }
.fu-select { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.fu-select select {
	box-sizing: border-box; height: 44px; min-width: 190px; margin: 0; padding: 0 40px 0 18px;
	border: 1px solid var(--fu-line); border-radius: 999px; background: #fff; color: var(--fu-text);
	font: inherit; font-size: 16px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: normal !important;
	-webkit-appearance: none; appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23005930' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.fu-select select:hover { border-color: var(--fu-green); }
.fu-select select:focus-visible { outline: 3px solid var(--fu-focus); outline-offset: 1px; }
.fu-select .fu-select__step {
	box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border: 1px solid var(--fu-line); border-radius: 50%;
	background: #fff; color: var(--fu-green); font-size: 22px; line-height: 1; text-decoration: none;
}
.fu-select a.fu-select__step:hover { border-color: var(--fu-green); background: var(--fu-green-tint); }
.fu-select a.fu-select__step:focus-visible { outline: 3px solid var(--fu-focus); outline-offset: 2px; }
.fu-select span.fu-select__step { opacity: .35; }

/* Melding en voetnoot bij een tabel. */
.fu-note { margin: 0 0 1em; padding: 8px 12px; border-left: 4px solid var(--fu-green); background: var(--fu-green-tint); }
.fu-footnote { font-size: 14px; color: var(--fu-muted); }

@media (max-width: 600px) {
	.fu-table__search { flex: 1 1 100%; }
	.fu-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
	.fu-chips::-webkit-scrollbar { display: none; }
	.fu-table__count { margin-left: 0; }
}
