/* School map: filter chips, map canvas, markers, popups and the school list. */

.eplex-schoolmap,
.eplex-schoolmap * {
	box-sizing: border-box;
}

.eplex-schoolmap {
	--eplex-elementary: #12707c;
	--eplex-k8: #7a3e9d;
	--eplex-middle: #c2410c;
	--eplex-branch: #16264c;
	--eplex-map-line: rgba(22, 38, 76, 0.16);
}

/* ---------- Markers (also used in chips, popups and the list) ---------- */

.eplex-mk {
	background: var(--eplex-elementary, #12707c);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(22, 38, 76, 0.35);
	display: inline-block;
	flex: none;
	height: 14px;
	width: 14px;
}

.eplex-mk--k8 {
	background: var(--eplex-k8, #7a3e9d);
	border-radius: 3px;
}

.eplex-mk--middle {
	background: var(--eplex-middle, #c2410c);
	border-radius: 2px;
	transform: rotate(45deg) scale(0.86);
}

.eplex-mk--branch {
	background: var(--eplex-branch, #16264c);
	border-color: #f5a03c;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	height: 18px;
	line-height: 14px;
	text-align: center;
	width: 18px;
}

.eplex-mk-wrap {
	background: none;
	border: 0;
}

.eplex-mk--onmap {
	display: block;
	height: 18px;
	width: 18px;
}

.eplex-mk--onmap.eplex-mk--branch {
	border-width: 3px;
	font-size: 15px;
	height: 30px;
	line-height: 24px;
	width: 30px;
}

.leaflet-marker-icon:focus-visible .eplex-mk {
	outline: 3px solid #16264c;
	outline-offset: 3px;
}

/* ---------- Filter chips ---------- */

.eplex-schoolmap__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.eplex-chip {
	align-items: center;
	background: #fff;
	border: 1px solid var(--eplex-map-line);
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.95rem;
	font-weight: 600;
	gap: 8px;
	min-height: 40px;
	padding: 6px 14px 6px 10px;
	user-select: none;
}

.eplex-chip[hidden] {
	display: none;
}

.eplex-chip input {
	accent-color: #16264c;
	height: 18px;
	margin: 0;
	width: 18px;
}

.eplex-chip:has(input:focus-visible) {
	outline: 3px solid #16264c;
	outline-offset: 2px;
}

.eplex-chip:has(input:not(:checked)) {
	background: #f3f4f7;
	color: #525b70;
}

.eplex-chip__n {
	color: #525b70;
	font-size: 0.85rem;
	font-weight: 500;
}

/* ---------- Map ---------- */

.eplex-schoolmap__canvas {
	background: #e9edf2;
	border: 1px solid var(--eplex-map-line);
	border-radius: 14px;
	max-height: 78vh;
	overflow: hidden;
	position: relative;
	z-index: 0;
}

.eplex-schoolmap__loading {
	color: #525b70;
	left: 0;
	margin: 0;
	position: absolute;
	right: 0;
	text-align: center;
	top: 45%;
}

.eplex-schoolmap__status {
	color: #8a2b06;
	font-weight: 600;
	margin: 8px 0 0;
}

.eplex-schoolmap__status:empty {
	display: none;
}

.eplex-schoolmap .leaflet-container {
	font: inherit;
	height: 100%;
	width: 100%;
}

/* ---------- Popups ---------- */

.eplex-pop {
	color: #16264c;
	font-size: 0.95rem;
	line-height: 1.45;
	min-width: 190px;
}

.gm-style .eplex-pop {
	max-width: 250px;
	padding-right: 6px;
}

.eplex-pop p {
	margin: 0 0 4px;
}

.eplex-pop__type {
	align-items: center;
	color: #525b70;
	display: flex;
	font-size: 0.78rem;
	font-weight: 700;
	gap: 6px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.eplex-pop__name {
	font-size: 1.08rem;
	font-weight: 800;
}

.eplex-pop__links {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 8px !important;
}

.eplex-pop a {
	color: #12707c;
	font-weight: 600;
}

/* ---------- School list ---------- */

.eplex-schoolmap__list {
	border: 1px solid var(--eplex-map-line);
	border-radius: 14px;
	margin-top: 14px;
	padding: 4px 18px;
}

.eplex-schoolmap__list summary {
	cursor: pointer;
	font-weight: 700;
	padding: 10px 0;
}

.eplex-schoolmap__group {
	align-items: center;
	display: flex;
	font-size: 1.05rem;
	gap: 8px;
	margin: 14px 0 8px;
}

.eplex-schoolmap__items {
	display: grid;
	gap: 6px 24px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.eplex-schoolmap__items li {
	border-bottom: 1px solid var(--eplex-map-line);
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 0;
}

.eplex-schoolmap__show {
	background: none;
	border: 0;
	color: #16264c;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: 4px 0;
	text-align: left;
	text-decoration: underline;
	text-decoration-color: rgba(22, 38, 76, 0.35);
	text-underline-offset: 3px;
}

.eplex-schoolmap__addr {
	color: #525b70;
	font-size: 0.9rem;
}

.eplex-schoolmap__items a {
	font-size: 0.9rem;
}
