/* Brandgevaarmeter (FWI) - front-end stijlen */

.bgm-fwi-meter {
	font-family: inherit;
	max-width: 260px;
	text-align: center;
	margin: 0 auto;
}

.bgm-fwi-meter-title {
	position: relative;
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 8px;
	opacity: 0.85;
}
/* Het "?"-venster bij "Actueel brandgevaar" centreren t.o.v. de hele
   titelregel (die de volledige breedte van de (compacte) kaart beslaat) in
   plaats van t.o.v. het kleine icoontje zelf. Zo blijft het venster ook in
   een smalle kaart/widget volledig zichtbaar, in plaats van half buiten de
   kaart te steken. */
.bgm-fwi-meter-title .bgm-fwi-help-wrap {
	position: static;
}

/* --- Link die naar de uitleg-sectie onderaan de pagina springt --- */
.bgm-fwi-explain-link-wrap {
	margin: 10px 0 0;
}
.bgm-fwi-explain-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #555;
	background: #f0f0f0;
	border-radius: 999px;
	padding: 5px 14px;
	text-decoration: none;
	transition: background 0.15s ease;
}
.bgm-fwi-explain-link:hover,
.bgm-fwi-explain-link:focus {
	background: #e2e2e2;
	color: #333;
}
/* Zorgt dat de sectie niet achter een vaste/sticky menubalk van je thema
   verdwijnt wanneer er naartoe gesprongen wordt. Pas de waarde aan als je
   menubalk hoger/lager is dan de standaard 90px. */
#bgm-fwi-explain {
	scroll-margin-top: 90px;
}

/* --- "?"-tooltip-icoontje (CSS-only, geen JS nodig) --- */
.bgm-fwi-help {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ddd;
	color: #555;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
	position: relative;
	vertical-align: middle;
	margin-left: 4px;
	text-transform: none;
	letter-spacing: normal;
}
.bgm-fwi-help:hover,
.bgm-fwi-help:focus {
	background: #bbb;
	outline: none;
}
.bgm-fwi-help:hover::after,
.bgm-fwi-help:focus::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	bottom: 135%;
	transform: translateX(-50%);
	background: #222;
	color: #fff;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	white-space: normal;
	width: 220px;
	max-width: 60vw;
	z-index: 30;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	text-transform: none;
	letter-spacing: normal;
}
.bgm-fwi-help:hover::before,
.bgm-fwi-help:focus::before {
	content: '';
	position: absolute;
	left: 50%;
	bottom: calc(135% - 6px);
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #222;
	z-index: 30;
}
.bgm-fwi-help--sm {
	width: 13px;
	height: 13px;
	font-size: 9px;
	margin-left: 3px;
}

/* --- Rijke "?"-popover met een echte mini-tabel (bv. bij "Actueel brandgevaar") --- */
.bgm-fwi-help-wrap {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	margin-left: 4px;
	cursor: help;
}
.bgm-fwi-help-wrap:focus {
	outline: none;
}
.bgm-fwi-help-panel {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 135%;
	transform: translateX(-50%);
	width: 260px;
	max-width: 70vw;
	background: #222;
	color: #f2f2f2;
	border: 1px solid #3a3a3a;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0,0,0,0.35);
	padding: 8px 10px;
	z-index: 40;
	text-align: left;
}
.bgm-fwi-help-wrap:hover .bgm-fwi-help-panel,
.bgm-fwi-help-wrap:focus .bgm-fwi-help-panel,
.bgm-fwi-help-wrap:focus-within .bgm-fwi-help-panel {
	display: block;
}
.bgm-fwi-help-panel--down {
	bottom: auto;
	top: 135%;
}
.bgm-fwi-help-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 400;
}
.bgm-fwi-help-table th,
.bgm-fwi-help-table td {
	padding: 4px 6px;
	text-align: left;
	white-space: nowrap;
}
.bgm-fwi-help-table thead th {
	border-bottom: 1px solid #444;
	font-weight: 600;
	font-size: 0.78rem;
}
.bgm-fwi-help-table tbody tr td:first-child {
	width: 14px;
}

/* --- Compacte kaart (startpagina/widget): titel + meter + badges + link --- */
.bgm-fwi-compact-card {
	max-width: 280px;
	margin: 0 auto;
	text-align: center;
	background: #fafbfc;
	border: 1px solid #ececec;
	border-radius: 10px;
	padding: 20px 16px;
	box-sizing: border-box;
}
.bgm-fwi-compact-card .bgm-fwi-subbadges {
	margin-top: 14px;
	margin-bottom: 0;
}
.bgm-fwi-compact-updated {
	margin: 6px 0 0;
	font-size: 0.78rem;
	color: #888;
}
.bgm-fwi-compact-link-wrap {
	margin: 16px 0 0;
}
.bgm-fwi-compact-source {
	margin: 10px 0 0;
	font-size: 0.72rem;
	color: #999;
}
.bgm-fwi-compact-source a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: rgba(153,153,153,0.5);
}
.bgm-fwi-compact-source a:hover,
.bgm-fwi-compact-source a:focus {
	color: #555;
}

.bgm-fwi-meter--empty {
	padding: 16px;
	border: 1px dashed #ccc;
	border-radius: 8px;
	color: #666;
	font-size: 0.9rem;
	max-width: 100%;
}

/* --- Gauge (naaldmeter) --- */
.bgm-fwi-gauge-svg {
	width: 100%;
	height: auto;
	display: block;
}
.bgm-fwi-gauge-value {
	font-size: 26px;
	font-weight: 700;
	fill: #222;
}
.bgm-fwi-gauge-label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 4px;
	font-weight: 600;
}
.bgm-fwi-class-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

/* --- Bar (kleurenbalk) --- */
.bgm-fwi-bar-wrap {
	width: 100%;
}
.bgm-fwi-bar-value {
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.1;
	margin-bottom: 6px;
}
.bgm-fwi-bar-classlabel {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	opacity: 0.9;
}
.bgm-fwi-bar-track {
	position: relative;
	display: flex;
	width: 100%;
	height: 20px;
	border-radius: 10px;
	overflow: visible;
}
.bgm-fwi-bar-seg:first-child { border-radius: 10px 0 0 10px; }
.bgm-fwi-bar-seg:last-child { border-radius: 0 10px 10px 0; }
.bgm-fwi-bar-seg {
	height: 100%;
	display: block;
}
.bgm-fwi-bar-marker {
	position: absolute;
	top: -6px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 10px solid #222;
	transform: translateX(-8px);
}
.bgm-fwi-bar-scalelabels {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	color: #777;
	margin-top: 4px;
}

/* --- Number (groot getal) --- */
.bgm-fwi-number-box {
	border-radius: 12px;
	padding: 18px 12px;
	color: #fff;
}
.bgm-fwi-number-value {
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
}
.bgm-fwi-number-classlabel {
	margin-top: 4px;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* --- Detailpagina: alles in één "venster" --- */
.bgm-fwi-page {
	max-width: 1100px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 16px;
	box-shadow: 0 2px 18px rgba(0,0,0,0.07);
	padding: 28px;
	box-sizing: border-box;
}
@media (max-width: 480px) {
	.bgm-fwi-page {
		padding: 18px 14px;
		border-radius: 12px;
	}
}
.bgm-fwi-page--empty {
	padding: 16px;
	border: 1px dashed #ccc;
	border-radius: 8px;
	color: #666;
}
.bgm-fwi-page-titlebar {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}
.bgm-fwi-page-title {
	margin: 0 0 4px;
	font-size: 1.4rem;
	font-weight: 700;
}
.bgm-fwi-page-subtitle {
	margin: 0;
	font-size: 0.88rem;
	color: #777;
}
.bgm-fwi-page-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
	text-align: center;
	background: #fafbfc;
	border: 1px solid #ececec;
	border-radius: 10px;
	padding: 24px 16px;
}
.bgm-fwi-page-header-meter {
	flex: none;
	width: 100%;
	max-width: 260px;
}
.bgm-fwi-page-header-info {
	flex: none;
	width: 100%;
	max-width: 480px;
}
.bgm-fwi-updated {
	color: #666;
	font-size: 0.9rem;
	margin: 0 0 10px;
}
.bgm-fwi-subbadges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 14px;
}
.bgm-fwi-subbadge {
	display: flex;
	flex-direction: column;
	font-size: 0.8rem;
}
.bgm-fwi-subbadge-label {
	color: #666;
	margin-bottom: 2px;
}
.bgm-fwi-subbadge-value {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	text-align: center;
}
.bgm-fwi-current-values {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin: 0;
}
.bgm-fwi-current-values div {
	min-width: 55px;
}
.bgm-fwi-current-values dt {
	font-size: 0.72rem;
	text-transform: uppercase;
	color: #888;
	letter-spacing: 0.5px;
}
.bgm-fwi-current-values dd {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
}

.bgm-fwi-section-title {
	margin: 32px 0 12px;
	font-size: 1.2rem;
}

.bgm-fwi-chart-card {
	background: #fafbfc;
	border: 1px solid #ececec;
	border-radius: 10px;
	padding: 16px;
}
.bgm-fwi-chart-card--main {
	margin-bottom: 8px;
}
.bgm-fwi-chart-card-title {
	margin: 0 0 12px;
	font-size: 1.05rem;
	font-weight: 700;
}
/* --- Uitschuifbare Sub-indices sectie onder de FWI-grafiek (CSS-only, geen JS) --- */
.bgm-fwi-subindices-details {
	margin: 8px 0 28px;
	text-align: center;
}
.bgm-fwi-subindices-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	cursor: pointer;
	font-size: 0.82rem;
	font-weight: 600;
	color: #555;
	background: #f0f0f0;
	border-radius: 999px;
	padding: 5px 14px;
	user-select: none;
}
.bgm-fwi-subindices-toggle::-webkit-details-marker {
	display: none;
}
.bgm-fwi-subindices-toggle:hover,
.bgm-fwi-subindices-toggle:focus {
	background: #e2e2e2;
	color: #333;
	outline: none;
}
.bgm-fwi-subindices-toggle::after {
	content: '▾';
	font-size: 0.7rem;
	transition: transform 0.15s ease;
}
.bgm-fwi-subindices-details[open] .bgm-fwi-subindices-toggle::after {
	transform: rotate(180deg);
}
.bgm-fwi-subindices-details[open] .bgm-fwi-subindices-toggle {
	margin-bottom: 20px;
}
.bgm-fwi-subindices-details .bgm-fwi-section-title {
	margin-top: 4px;
	text-align: left;
}

.bgm-fwi-chart-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px;
}
.bgm-fwi-chart-grid h4 {
	margin: 0 0 8px;
	font-size: 0.95rem;
}
.bgm-fwi-card-subtitle {
	display: block;
	font-weight: 400;
	font-size: 0.75rem;
	color: #888;
}

/* --- Server-side SVG-grafieken (geen JS nodig) --- */
.bgm-fwi-chart-svg {
	width: 100%;
	height: auto;
	display: block;
}
.bgm-fwi-chart-svg--mini {
	max-height: 170px;
}
.bgm-fwi-chart-axis {
	font-size: 10px;
	fill: #888;
}
.bgm-fwi-chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 10px;
	font-size: 0.85rem;
	color: #444;
}
.bgm-fwi-chart-legend i {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	margin-right: 4px;
	vertical-align: -1px;
}
.bgm-fwi-chart-note {
	margin: 8px 0 0;
	font-size: 0.78rem;
	color: #888;
	font-style: italic;
}

.bgm-fwi-explain-intro {
	color: #444;
	max-width: 820px;
	line-height: 1.55;
	margin: 0 0 16px;
}
.bgm-fwi-explain-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	margin-bottom: 8px;
}
.bgm-fwi-explain-card {
	background: #fafbfc;
	border: 1px solid #ececec;
	border-radius: 10px;
	padding: 16px;
}
.bgm-fwi-explain-card h4 {
	margin: 0 0 8px;
	font-size: 1rem;
}
.bgm-fwi-explain-card .bgm-fwi-card-subtitle {
	margin-top: 2px;
	font-size: 0.78rem;
}
.bgm-fwi-explain-card p {
	margin: 0 0 8px;
	font-size: 0.88rem;
	line-height: 1.55;
	color: #333;
}
.bgm-fwi-explain-scale {
	font-size: 0.8rem !important;
	color: #888 !important;
	font-style: italic;
	margin: 0 !important;
}

.bgm-fwi-legend-table {
	border-collapse: collapse;
	max-width: 420px;
}
.bgm-fwi-legend-table th,
.bgm-fwi-legend-table td {
	padding: 6px 12px;
	text-align: left;
	border-bottom: 1px solid #eee;
}
.bgm-fwi-legend-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: inline-block;
}

.bgm-fwi-table-wrap {
	overflow-x: auto;
}
.bgm-fwi-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.88rem;
}
.bgm-fwi-table th,
.bgm-fwi-table td {
	padding: 6px 10px;
	border-bottom: 1px solid #eee;
	white-space: nowrap;
	text-align: right;
}
.bgm-fwi-table th:first-child,
.bgm-fwi-table td:first-child {
	text-align: left;
}
.bgm-fwi-table thead th {
	background: #e9ecef;
	position: sticky;
	top: 0;
}
.bgm-fwi-table-classdot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	display: inline-block;
	margin-right: 4px;
}

@media (prefers-color-scheme: dark) {
	.bgm-fwi-page {
		background: #161616;
		border-color: #2c2c2c;
	}
	.bgm-fwi-page-titlebar {
		border-bottom-color: #2c2c2c;
	}
	.bgm-fwi-page-title {
		color: #f2f2f2;
	}
	.bgm-fwi-page-subtitle {
		color: #999;
	}
	.bgm-fwi-page-header,
	.bgm-fwi-chart-card,
	.bgm-fwi-explain-card,
	.bgm-fwi-compact-card {
		background: #232323;
		border-color: #333;
	}
	.bgm-fwi-table thead th {
		background: #2d2d2d;
	}
	.bgm-fwi-table th,
	.bgm-fwi-table td,
	.bgm-fwi-legend-table th,
	.bgm-fwi-legend-table td {
		border-bottom-color: #333;
	}
	.bgm-fwi-explain-card p {
		color: #ddd;
	}
	.bgm-fwi-explain-intro {
		color: #ccc;
	}
	.bgm-fwi-explain-link {
		background: #2a2a2a;
		color: #ddd;
	}
	.bgm-fwi-explain-link:hover,
	.bgm-fwi-explain-link:focus {
		background: #3a3a3a;
		color: #fff;
	}
	.bgm-fwi-subindices-toggle {
		background: #2a2a2a;
		color: #ddd;
	}
	.bgm-fwi-subindices-toggle:hover,
	.bgm-fwi-subindices-toggle:focus {
		background: #3a3a3a;
		color: #fff;
	}
	.bgm-fwi-compact-updated {
		color: #999;
	}
	.bgm-fwi-compact-source {
		color: #777;
	}
	.bgm-fwi-compact-source a:hover,
	.bgm-fwi-compact-source a:focus {
		color: #ddd;
	}
}
