/* mod_schoolmap – scoped to .mod-schoolmap */

.mod-schoolmap {
	--sm-height: 420px;
	--sm-max-width: none;
	max-width: var(--sm-max-width);
	margin-inline: auto;
}

.mod-schoolmap__map {
	display: none;
	position: relative;
	width: 100%;
	height: var(--sm-height);
	max-height: 80vh;
	border-radius: 0.25rem;
	overflow: hidden;
	background: #eef1f3;
}

.mod-schoolmap--active .mod-schoolmap__map {
	display: block;
}

.mod-schoolmap__map[hidden] {
	display: none !important;
}

@media (max-width: 575.98px) {
	.mod-schoolmap__map {
		height: min(var(--sm-height), 70vh);
	}
}

.mod-schoolmap__fallback {
	padding: 1rem;
	border: 1px dashed #8a8f94;
	border-radius: 0.25rem;
	color: #3d4246;
}

.mod-schoolmap__fallback[hidden] {
	display: none;
}

.mod-schoolmap__address {
	margin-top: 0.75rem;
	font-style: normal;
}

/* ---- marker ---- */
.mod-schoolmap__marker {
	display: block;
	width: var(--sm-marker-size, 36px);
	height: var(--sm-marker-size, 36px);
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

span.mod-schoolmap__marker {
	cursor: default;
}

.mod-schoolmap__marker:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
	border-radius: 50%;
	box-shadow: 0 0 0 5px #fff;
}

.mod-schoolmap__popup {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: 0.9rem;
	line-height: 1.35;
	color: #1a1a1a;
	padding-right: 1rem;
}

/* ---- mandatory attribution: always visible, readable, above other controls ---- */
.mod-schoolmap .maplibregl-ctrl-bottom-right {
	z-index: 3;
	max-width: 100%;
}

.mod-schoolmap .maplibregl-ctrl-attrib,
.mod-schoolmap .maplibregl-ctrl-attrib-inner {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.mod-schoolmap .maplibregl-ctrl-attrib {
	margin: 0 !important;
	padding: 2px 6px !important;
	background: rgba(255, 255, 255, 0.92) !important;
	border-radius: 0.25rem 0 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #1a1a1a;
	max-width: 100%;
	white-space: normal;
}

.mod-schoolmap .maplibregl-ctrl-attrib a {
	color: #1a1a1a;
	text-decoration: underline;
}

.mod-schoolmap .maplibregl-ctrl-attrib-button {
	display: none !important;
}

.mod-schoolmap .maplibregl-ctrl-bottom-left .maplibregl-ctrl-scale {
	margin-bottom: 26px;
}

.mod-schoolmap .maplibregl-ctrl button:focus-visible,
.mod-schoolmap .maplibregl-canvas:focus-visible,
.mod-schoolmap .maplibregl-ctrl-attrib a:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: -3px;
	box-shadow: inset 0 0 0 5px #fff;
}

@media (prefers-reduced-motion: reduce) {
	.mod-schoolmap * {
		transition: none !important;
		animation: none !important;
	}
}
