.map-wrapper {
	margin-top: 6em;
	display: grid;
	grid-template-columns: 4fr 1fr;
	gap: 1em;
}
.map-container {
	position: relative;
	min-width: 0;
}
#map {
	height: 600px;
	width: 100%;
	background: #111;
	text-shadow: none;
	font-family: inherit;
	outline: 1px solid var(--color-gray);
}
:is(#map, #flag-map):fullscreen,
:is(#map, #flag-map).maplibregl-pseudo-fullscreen {
	width: 100dvw;
	height: 100dvh;
	outline: none;
}
.map-status {
	position: absolute;
	left: 1em;
	bottom: 2em;
	right: 1em;
	width: fit-content;
	max-width: calc(100% - 2em);
	margin: 0;
	padding: 0.5em 0.75em;
	background: var(--color-dark);
	pointer-events: none;
}
.map-status[hidden] {
	display: none;
}
#type-selector {
	display: grid;
	margin-top: 0.5em;
	line-height: 2;
}
	#type-selector input {
		position: absolute;
		opacity: 0;
		width: 1px;
		height: 1px;
	}
	#type-selector label {
		cursor: pointer;
		padding: 0 0.5em;
		display: flex;
		align-items: baseline;
		gap: 0.5em;
		white-space: nowrap;
		transition: background-color 0.1s ease-out;
	}
	#type-selector label:hover {
		background-color: color-mix(in srgb, var(--color-blue), transparent 90%);
	}
	#type-selector label:has(input:checked) {
		background-color: color-mix(in srgb, var(--color-blue), transparent 50%);
		cursor: default;
	}
	#type-selector label:has(input:focus-visible) {
		outline: 1px solid currentColor;
	}
	#type-selector label span {
		text-decoration: underline dashed;
		text-underline-offset: 0.25em;
	}
	#type-selector label:has(input:checked) span {
		text-decoration: none;
	}
	#type-selector small {
		font-size: 12px;
	}
:is(#map, #flag-map) .maplibregl-ctrl-group {
	background: var(--color-gray);
	color: var(--color-light);
}
:is(#map, #flag-map) .maplibregl-ctrl-group,
:is(#map, #flag-map) .maplibregl-ctrl-group button {
	border-radius: 0;
}
:is(#map, #flag-map) .maplibregl-ctrl-group button + button {
	border-color: var(--color-grayish);
}
:is(#map, #flag-map) .maplibregl-ctrl-icon {
	display: grid;
	place-items: center;
	background-image: none;
	filter: invert(1);
}
:is(#map, #flag-map) .maplibregl-ctrl-icon svg {
	width: 14px;
	height: 14px;
}
:is(#map, #flag-map) .maplibregl-ctrl-attrib {
	display: none;
}
:is(#map, #flag-map) .flag-map-tooltip {
	position: absolute;
	z-index: 2;
	pointer-events: none;
	font-family: var(--font-narrow);
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.2;
	color: var(--color-dark);
	text-shadow: none;
	background: #fff;
	padding: 2px 7px;
	border-radius: 3px;
	max-width: min(280px, calc(100% - 8px));
	width: max-content;
	box-shadow: 0 1px 4px #0004;
}
	:is(#map, #flag-map) .flag-map-tooltip[hidden] {
		display: none;
	}
	:is(#map, #flag-map) .flag-map-tooltip::after {
		content: '';
		position: absolute;
		border: 4px solid transparent;
	}
	:is(#map, #flag-map) .flag-map-tooltip[data-side="top"]::after {
		top: 100%;
		left: var(--arrow);
		margin-left: -4px;
		border-bottom: 0;
		border-top-color: #fff;
	}
	:is(#map, #flag-map) .flag-map-tooltip[data-side="bottom"]::after {
		bottom: 100%;
		left: var(--arrow);
		margin-left: -4px;
		border-top: 0;
		border-bottom-color: #fff;
	}
	:is(#map, #flag-map) .flag-map-tooltip[data-side="left"]::after {
		left: 100%;
		top: var(--arrow);
		margin-top: -4px;
		border-right: 0;
		border-left-color: #fff;
	}
	:is(#map, #flag-map) .flag-map-tooltip[data-side="right"]::after {
		right: 100%;
		top: var(--arrow);
		margin-top: -4px;
		border-left: 0;
		border-right-color: #fff;
	}
@media (width < 600px) {
	.map-wrapper {
		grid-template-columns: 1fr;
		margin-top: 3em;
	}
	#map {
		height: 56vh;
	}
	:is(#map, #flag-map) .maplibregl-ctrl-group:has(.maplibregl-ctrl-zoom-in) {
		display: none;
	}
	:is(#map, #flag-map) .maplibregl-ctrl-top-left {
		top: auto;
		left: auto;
		right: 0;
		bottom: 0;
	}
	:is(#map, #flag-map) .maplibregl-ctrl-top-left .maplibregl-ctrl {
		margin: 0 10px 10px 0;
	}
	#type-selector {
		grid-template-columns: auto auto;
	}
}
