/* ====================================================================
   [school_map] — nursery + nearby primary schools map.
   Added 2026-11-10. Markup: functions/school-map.php. Prefix .tw-school-map.
   Selectors are prefixed with .tw-blog-content where they must beat
   blog.css's generic content rules (img, ol, li, a).
   ==================================================================== */

.tw-school-map {
	margin: 28px 0 40px;
	padding: 0;
}

.tw-school-map__canvas {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	min-height: 280px;
	border-radius: 20px;
	overflow: hidden;
	background: #f0eeeb;
}
@media (max-width: 768px) {
	.tw-school-map__canvas { aspect-ratio: 4 / 3; }
}

.tw-school-map__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #919399;
}
.tw-school-map.is-ready .tw-school-map__loading { display: none; }
.tw-school-map.is-failed .tw-school-map__canvas { display: none; }

/* blog.css styles every content <img> as a rounded, margined photo. Undo it
   for Google's map tiles and markers or the map renders as a broken grid. */
.tw-blog-content .tw-school-map__canvas img {
	max-width: none;
	margin: 0;
	border-radius: 0;
}

/* ---- Key under the map ---- */
.tw-blog-content .tw-school-map ol.tw-school-map__key,
.tw-school-map ol.tw-school-map__key {
	list-style: none;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px 10px;
	margin: 14px 0 0;
	padding: 0;
}
.tw-blog-content .tw-school-map li.tw-school-map__key-item,
.tw-school-map li.tw-school-map__key-item {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tw-school-map li.tw-school-map__key-item::before,
.tw-school-map li.tw-school-map__key-item::marker { content: none; }

.tw-school-map__key-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 14px 6px 6px;
	border: 1px solid #e8e5e1;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	line-height: 1.3;
	color: #2e2f33;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}
.tw-school-map__key-btn:hover { border-color: #d1cbc3; background: #f6f5f3; }
.tw-school-map__key-btn:focus-visible { outline: 2px solid #373b97; outline-offset: 2px; }
.tw-school-map:not(.is-ready) .tw-school-map__key-btn { cursor: default; }

.tw-school-map__badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #AE5DE0; /* logo purple — matches the school pins */
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}
/* Logo-red ring with a white centre, echoing the nursery pin on the map. */
.tw-school-map__badge--nursery {
	background: #fff;
	box-shadow: inset 0 0 0 7px #EE1C2D;
}

/* ---- Info window ---- */
.tw-school-map__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 240px;
	padding-bottom: 4px; /* room for the link underline; Google sizes the box to the pixel */
	font-size: 14px;
	line-height: 1.35;
	color: #2e2f33;
}
.tw-school-map__info strong { font-size: 15px; }
/* Google's info-window body is overflow:scroll and rounds its height down,
   so short content like ours showed a needless scrollbar for 1px. */
.tw-school-map .gm-style-iw-d { overflow: hidden !important; }
.tw-school-map__info a { color: #373b97; text-decoration: underline; }

.tw-school-map__notice {
	margin: 10px 0 0;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fdf1e3;
	font-size: 14px;
	color: #2e2f33;
}
