/*
 * Live Application Map (slug live_map). Port of the theme's
 * assets/css/live-map.css with the theme tokens renamed to the playground
 * ones (--type-* -> --f-*, --color-* -> --c-*, --radius-16/20 -> --r-m/l),
 * icons as .icon mask spans instead of inline <svg>, .button -> .btn, and
 * the desktop breakpoint at 768px (playground breakpoint) instead of 64rem.
 * Still mobile first, like the theme file. Additions are marked "Playground".
 *
 * Figma (HOMZ, page "Project Map" 1697:29670):
 *   desktop/livemap/1 1637:23066 — toolbar 32px below the nav
 *     (header/2XL title + body/M subtitle, 480x44 search, 44px pill row, 24px
 *     apart); full-width maparea 619 tall 32px below; controls 32px squares,
 *     8px apart, 24px from the right and bottom.
 *   mobile/livemap/1 1426:35407 — 16px below the nav: header/L + body/XS,
 *     350 search, pills, 16px apart; maparea 519 tall; controls 20px in.
 *   card/mapprojects 480x171 desktop, 350x140 mobile.
 *   filters desktop/livemap/3 1646:24041 + /4 1646:24945 (720 wide); mobile
 *     bottom sheet mobile/livemap/application type 1474:19202, council 1474:19477.
 *   project modal desktop/livemap/6 1697:28028 (720 wide), mobile 350 wide.
 *
 * Not in the design, so provisional (as in the theme): selected pill and
 * checkbox states, the status message over the map, the search suggestions
 * list, the mobile card's inner positions, dialog heights on short screens.
 */

/* Playground: the page sits under the transparent header; the toolbar's own
 * top padding gives the 16px (mobile) / 32px (desktop) gap below the nav. */
.live-map { padding-top: var(--header-h); }

/* Playground: elements toggled with [hidden] that set their own display
 * (search clear, my-location). Missing in the theme, where the clear button
 * therefore always shows. */
.live-map [hidden] { display: none; }

/* Approved tag: theme .project-tag (assets/css/project-card.css). */
:where(.live-map) .project-tag {
	display: inline-flex;
	gap: 0.25rem;
	align-items: center;
	justify-content: center;
	padding: 0.375rem 0.5rem; /* 6 8 */
	font: var(--f-subtitle-s);
	color: var(--c-text-dark);
	white-space: nowrap;
	background-color: var(--c-secondary);
	border-radius: var(--r-pill);
}

:where(.live-map) .project-tag__icon {
	display: inline-flex;
	width: 0.75rem;
	height: 0.75rem;
}

.live-map .project-tag__icon .icon { --icon-size: 100%; }

/* ==================================================================
 * Toolbar
 * ================================================================ */

.live-map__toolbar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.live-map__header {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.live-map__title {
	font: var(--f-header-l);
	color: var(--c-text-dark);
}

.live-map__subtitle {
	font: var(--f-body-xs);
	color: var(--c-text-grey);
}

/* Mobile/desktop subtitles (mobile/livemap/1: "See our projects on map."). */
.live-map__subtitle-text--desktop { display: none; }

/* Search: searchbox 1224:27684 over a light pill. */
.live-map__search,
.map-filters__search {
	position: relative;
	display: flex;
	gap: 0.5rem;
	align-items: center;
	height: 2.75rem; /* 44 */
	padding-inline: 1rem;
	background-color: var(--c-bg-grey);
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-pill);
}

/* Playground: keep the 44px pill when the filter list below takes the rest of
 * the dialog (it shrank to ~22px; same in the theme). */
.map-filters__search { flex-shrink: 0; }

.live-map__search:focus-within,
.map-filters__search:focus-within {
	border-color: var(--c-primary);
}

.live-map__search-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	color: var(--c-text-grey);
}

.live-map__search-icon .icon {
	--icon-size: 100%;
}

.live-map__search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	padding: 0;
	font: var(--f-subtitle-l);
	color: var(--c-text-dark);
	background: none;
	border: 0;
	outline: none;
	appearance: none;
}

.live-map__search-input::placeholder {
	color: var(--c-text-grey);
	opacity: 1;
}

.live-map__search-input::-webkit-search-cancel-button {
	appearance: none;
}

.live-map__search-clear {
	display: inline-grid;
	flex-shrink: 0;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	color: var(--c-text-grey);
	cursor: pointer;
	background: none;
	border: 0;
}

.live-map__search-clear .icon {
	--icon-size: 1rem;
}

.live-map__suggestions {
	position: absolute;
	inset: calc(100% + 0.5rem) 0 auto;
	z-index: 1100;
	max-height: 18rem;
	padding: 0.5rem 0;
	margin: 0;
	overflow-y: auto;
	list-style: none;
	background-color: var(--c-bg-white);
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-m);
	box-shadow: 0 8px 24px rgba(9, 3, 19, 0.08);
}

.live-map__suggestion {
	padding: 0.625rem 1rem;
	font: var(--f-subtitle-m);
	color: var(--c-text-dark);
	cursor: pointer;
}

.live-map__suggestion[aria-selected="true"],
.live-map__suggestion:hover {
	background-color: var(--c-bg-purple);
}

/* Pills: tag/medium, 44 tall, 8px apart; one scrolling row. */
.live-map__pills {
	display: flex;
	gap: 0.5rem;
	margin-inline: calc(-1 * var(--gutter));
	padding-inline: var(--gutter);
	overflow-x: auto;
	scrollbar-width: none;
}

.live-map__pills::-webkit-scrollbar {
	display: none;
}

.live-map__type-pills {
	display: contents;
}

.live-map__pill {
	display: inline-flex;
	flex-shrink: 0;
	gap: 0.25rem;
	align-items: center;
	justify-content: center;
	height: 2.75rem; /* 44 */
	padding: 0.4375rem 1rem 0.5rem; /* 7 16 8 */
	font: var(--f-subtitle-m);
	color: var(--c-primary);
	white-space: nowrap;
	cursor: pointer;
	background-color: rgba(255, 255, 255, 0.3);
	border: 1px solid var(--c-purple-soft);
	border-radius: var(--r-pill);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.live-map__pill:hover {
	background-color: var(--c-bg-purple);
}

/* Selected type pill: filled like the Filters pill (desktop/livemap/2,
 * mobile/livemap/8); on mobile it adds a 12px × after the label. */
.live-map__pill[aria-pressed="true"],
.live-map__pill--filters {
	color: var(--c-text-white);
	background-color: var(--c-primary);
	border-color: var(--c-primary);
}

.live-map__pill[aria-pressed="true"]:hover,
.live-map__pill--filters:hover {
	background-color: var(--c-primary-hover);
}

.live-map__pill-icon {
	display: inline-flex;
	width: 1rem;
	height: 1rem;
}

.live-map__pill-x {
	display: none;
	width: 0.75rem; /* 12 */
	height: 0.75rem;
}

.live-map__pill-x .icon {
	--icon-size: 100%;
}

.live-map__pill[aria-pressed="true"] .live-map__pill-x {
	display: inline-flex;
}

.live-map__pill-icon .icon {
	--icon-size: 100%;
}

/* ==================================================================
 * Map area
 * ================================================================ */

/* 16px below the pills on mobile: the toolbar's bottom padding. */
.live-map__area {
	position: relative;
	height: 32.4375rem; /* 519 */
	overflow: hidden;
}

.live-map__map {
	position: absolute;
	inset: 0;
	z-index: 0;
	font-family: var(--font);
	background-color: #e5e5e3; /* tile ground while loading */
}

/* Playground: no tiles; land drawn as vector shapes over this sea colour
 * (sampled from desktop/livemap/1). */
.live-map__map--vector {
	background-color: #c2c8ca;
}

/* Leaflet only lifts the img/svg max-width reset for its own overlay pane;
 * the land pane needs it too. */
.live-map__map .leaflet-pane > svg { max-width: none; }

.live-map__map:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: -2px;
}

/* OpenStreetMap's colourful tiles, turned pale grey to approach the design's
 * map (grey sea, near-white land). Tuned against assets/images/map-preview-wide.jpg.
 * Only the tile layer: pins, card and controls keep their colours. Remove this
 * if a provider with a grey style is set (inc/live-map.php). */
.live-map__map .leaflet-tile-pane {
	filter: grayscale(1) brightness(0.86) contrast(1.6);
}

.live-map__map .leaflet-control-attribution {
	font: 400 0.625rem/1.4 var(--font);
	background-color: rgba(255, 255, 255, 0.8);
}

.live-map__controls {
	position: absolute;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 500;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.live-map__control {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	color: var(--c-text-dark);
	cursor: pointer;
	background-color: var(--c-bg-white);
	border: 1px solid var(--c-border-light);
	border-radius: 0.5rem;
}

.live-map__control:hover {
	border-color: var(--c-border-dark);
}

.live-map__control .icon {
	--icon-size: 1rem;
}

.live-map__status {
	position: absolute;
	top: 1.25rem;
	left: 50%;
	z-index: 500;
	max-width: calc(100% - 2.5rem);
	padding: 0.5rem 1rem;
	font: var(--f-subtitle-m);
	color: var(--c-text-dark);
	text-align: center;
	background-color: var(--c-bg-white);
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-pill);
	transform: translateX(-50%);
}

/* ------------------------------------------------------------------
 * Pins: pin/location 1429:37709 (single 32x35, selected 36x40, grouped 44x38).
 * Single and selected carry a white circle in the middle of the head (12px and
 * 16px across); grouped carries the count instead.
 * ---------------------------------------------------------------- */

.live-map .homz-pin,
.live-map .homz-cluster {
	background: none;
	border: 0;
}

.homz-pin img,
.homz-cluster img {
	display: block;
	width: 100%;
	height: 100%;
	/* Figma dx 2, dy 4, stdDeviation 4; CSS takes twice the deviation. */
	filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.15));
}

.homz-cluster {
	position: relative;
}

.homz-cluster__count {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 2rem; /* the round body, above the tail */
	font: var(--f-subtitle-m);
	line-height: 2rem;
	color: var(--c-text-white);
	text-align: center;
}

/* ------------------------------------------------------------------
 * Card: card/mapprojects
 * ---------------------------------------------------------------- */

.map-card {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	z-index: 600;
	display: flex;
	gap: 1rem;
	align-items: center;
	width: min(21.875rem, calc(100% - 2.5rem)); /* 350 */
	min-height: 8.75rem; /* 140 */
	padding: 0.75rem 3rem 0.75rem 1rem;
	background-color: var(--c-bg-white);
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-m);
	transform: translateX(-50%);
}

.map-card[hidden] {
	display: none;
}

.map-card__side {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	gap: 0.75rem;
	align-items: center;
}

.map-card__icon {
	width: 4.25rem; /* 68 */
	height: 4.25rem;
}

/* Text column top-aligned with the Approved tag, whatever rows it has
 * (card/mapprojects: title 17px from the card top on mobile, 16 on desktop). */
.map-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem; /* 8 */
	align-items: flex-start;
	align-self: flex-start;
	min-width: 0;
	padding-top: 0.25rem; /* border 1 + 12 + 4 = 17 */
}

.map-card__title {
	font: var(--f-subtitle-m);
	color: var(--c-text-dark);
}

.map-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem; /* 4 */
}

.map-card__application,
.map-card__row {
	font: var(--f-subtitle-s);
	color: var(--c-text-grey);
}

.map-card__application:empty {
	display: none;
}

.map-card__row {
	display: flex;
	gap: 0.25rem;
	align-items: center;
}

.map-card__row-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 0.875rem; /* 14 */
	height: 0.875rem;
	color: var(--c-primary);
}

.map-card__row-icon .icon {
	--icon-size: 100%;
}

.map-card__details {
	display: inline-flex;
	gap: 0.125rem;
	align-items: center;
	padding: 0;
	font: var(--f-header-3xs);
	color: var(--c-primary);
	cursor: pointer;
	background: none;
	border: 0;
}

.map-card__details-icon {
	display: inline-flex;
	width: 0.75rem;
	height: 0.75rem;
}

.map-card__details-icon .icon {
	--icon-size: 100%;
}

.map-card__close {
	position: absolute;
	top: 0.9375rem; /* 15 */
	right: 1rem;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	color: var(--c-text-dark);
	cursor: pointer;
	background-color: var(--c-bg-white);
	border: 1px solid var(--c-border-light);
	border-radius: 0.5rem;
}

.map-card__close .icon {
	--icon-size: 1rem;
}

/* ==================================================================
 * Dialogs: filters (bottom sheet on mobile) and project details
 * ================================================================ */

.map-sheet {
	max-width: 100%;
	max-height: 100%;
	padding: 0;
	overflow: hidden;
	color: var(--c-text-dark);
	border: 0;
}

.map-sheet[open] {
	display: flex;
	flex-direction: column;
}

.map-sheet::backdrop {
	background-color: rgba(9, 3, 19, 0.5);
	backdrop-filter: blur(1px);
}

.map-sheet__close {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 1.5rem; /* 24 */
	height: 1.5rem;
	padding: 0;
	color: var(--c-text-dark);
	cursor: pointer;
	background: none;
	border: 0;
}

.map-sheet__close .icon {
	--icon-size: 100%;
}

.map-sheet__actions {
	display: flex;
	flex-shrink: 0;
	gap: 0.625rem; /* 10 */
	padding: 1rem 1.25rem;
	background-color: var(--c-bg-grey);
	border-top: 1px solid var(--c-border-light);
}

.map-sheet__actions .btn {
	flex: 1 1 0;
	min-width: 0;
}

/* Clear All with nothing to clear: grey filled, white label (mobile/livemap/5,
 * application type, council), same as base .btn[aria-disabled]. */
.map-sheet__actions .btn:disabled {
	color: var(--c-text-white);
	cursor: default;
	background: var(--c-text-grey);
	border-color: var(--c-text-grey);
}

/* ---- Filters ---- */

.map-filters {
	position: fixed;
	inset: auto 0 0;
	width: 100%;
	height: calc(100% - 3.5rem); /* 788 of 844: below the mobile head */
	margin: 0;
	background-color: var(--c-bg-white);
	border-radius: var(--r-l) var(--r-l) 0 0;
}

.map-sheet__grabber {
	position: absolute;
	top: 0.375rem;
	left: 50%;
	width: 2.25rem; /* 36 */
	height: 0.3125rem; /* 5 */
	background-color: var(--c-border-light);
	border-radius: var(--r-pill);
	transform: translateX(-50%);
}

/* nav/back: 20px in, 18 down on mobile (16 on desktop); 28px arrow, 2px gap,
 * "Back" 16/600. Only in a pane. */
.map-filters__back {
	position: absolute;
	top: 1.125rem; /* 18 */
	left: 1.25rem;
	z-index: 2;
	display: inline-flex;
	gap: 0.125rem;
	align-items: center;
	height: 1.75rem;
	padding: 0 0.25rem 0 0;
	font: var(--f-subtitle-l);
	color: var(--c-text-dark);
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: 0.5rem;
}

.map-filters__back[hidden] {
	display: none;
}

.map-filters__back-icon {
	flex-shrink: 0;
	width: 1.75rem; /* 28 */
	height: 1.75rem;
}

.map-filters__back:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: 2px;
}

/* Text 52px down, 24 above the rows / search; 16 above a list with no search
 * (application type 1474:19202). */
.map-filters__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 1.5rem;
	min-height: 0;
	padding: 3.25rem 1.25rem 0; /* text at 52 */
}

.map-filters__text {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding-right: 2rem;
}

.map-filters__title {
	font: var(--f-header-s);
}

.map-filters__description {
	font: var(--f-subtitle-m);
	color: var(--c-text-grey);
}

.map-filters__level {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.5rem;
	min-height: 0;
}

.map-filters__level[hidden],
.map-filters__search[hidden] {
	display: none;
}

.map-filters--no-search .map-filters__content {
	gap: 1rem;
}

.map-filters__rows,
.map-filters__list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.map-filters__rows {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.map-filters__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 3.25rem; /* 52 */
	padding: 0;
	font: var(--f-subtitle-l);
	color: var(--c-text-dark);
	text-align: left;
	cursor: pointer;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--c-border-light);
}

.map-filters__count {
	font-weight: 800;
	color: var(--c-primary);
}

.map-filters__row-icon {
	display: inline-flex;
	width: 1.5rem;
	height: 1.5rem;
}

.map-filters__row-icon .icon {
	--icon-size: 100%;
}

.map-filters__list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	scrollbar-color: var(--c-text-grey) var(--c-border-light);
	scrollbar-width: thin;
}

.map-filters__option {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	justify-content: space-between;
	min-height: 3.25rem;
	padding: 0.625rem 0; /* 10 */
	cursor: pointer;
	border-bottom: 1px solid var(--c-border-light);
}

.map-filters__option-icon {
	flex-shrink: 0;
	width: 2rem; /* 32 */
	height: 2rem;
}

.map-filters__option-label {
	flex: 1 1 auto;
	font: var(--f-subtitle-m);
	color: var(--c-text-dark);
	text-align: center;
}

/* Application Type and Council rows: label left, no icon, 16/600. */
.map-filters__option--plain .map-filters__option-label {
	font: var(--f-subtitle-l);
	text-align: left;
}

.map-filters__checkbox {
	position: relative;
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	margin: 0;
	cursor: pointer;
	border: 1.5px solid var(--c-border-light);
	border-radius: 0.375rem;
	appearance: none;
}

/* Checked: not designed. Primary fill with a white check. */
.map-filters__checkbox:checked {
	background: var(--c-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.875 6.75349L4.12151 9L10.1215 3' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
	border-color: var(--c-primary);
}

.map-filters__checkbox:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: 2px;
}

/* ---- Project details ---- */

.project-modal {
	width: min(21.875rem, calc(100% - 2.5rem)); /* 350 */
	max-height: calc(100% - 2.5rem);
	margin: auto;
	background-color: var(--c-bg-white);
	border-radius: var(--r-l);
}

.project-modal__hero {
	position: relative;
	display: grid;
	flex-shrink: 0;
	place-items: center;
	height: 13.625rem; /* 218 */
	background-color: var(--c-bg-purple);
}

.project-modal__icon {
	width: 8.875rem; /* 142 */
	height: 8.875rem;
	margin-top: -2.25rem; /* centre 18 above the middle */
}

.project-modal__tag {
	position: absolute;
	top: 10.625rem; /* 170 */
	left: 1.25rem;
}

.project-modal__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 1rem;
	min-height: 0;
	padding: 1rem 1.25rem 1.5rem;
	overflow-y: auto;
}

.project-modal__heading {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.project-modal__title {
	font: var(--f-header-m);
}

.project-modal__application {
	font: var(--f-body-m);
}

.project-modal__id {
	font: var(--f-body-xs);
}

.project-modal__description {
	font: var(--f-body-xs);
	color: var(--c-text-grey);
}

.project-modal__application:empty,
.project-modal__description:empty {
	display: none;
}

.project-modal__meta {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.project-modal__row {
	display: flex;
	gap: 0.375rem; /* 6 */
	align-items: center;
	font: var(--f-subtitle-l);
	color: var(--c-text-grey);
}

.project-modal__row-icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	color: var(--c-primary);
}

.project-modal__row-icon .icon {
	--icon-size: 100%;
}

.project-modal__actions {
	flex-direction: column;
	gap: 1rem;
	padding: 1rem 1.25rem;
}

/* ==================================================================
 * Desktop
 * ================================================================ */

@media (min-width: 768px) {
	.live-map__toolbar {
		gap: 1.5rem; /* 24 */
		padding-top: 2rem;
		padding-bottom: 0;
	}

	.live-map__title {
		font: var(--f-header-2xl);
	}

	.live-map__subtitle {
		font: var(--f-body-m);
	}

	.live-map__subtitle-text--desktop { display: inline; }
	.live-map__subtitle-text--mobile { display: none; }

	/* No × on the selected pill on desktop (desktop/livemap/2). */
	.live-map__pill[aria-pressed="true"] .live-map__pill-x {
		display: none;
	}

	.live-map__search {
		width: 30rem; /* 480 */
	}

	.live-map__pills {
		margin-inline: 0;
		padding-inline: 0;
	}

	.live-map__area {
		height: 38.6875rem; /* 619 */
		margin-top: 2rem;
	}

	.live-map__controls {
		right: 1.5rem;
		bottom: 1.5rem;
	}

	/* card/mapprojects 1647:25597: 480x171, 24px above the bottom. Side column
	 * at 31, text at 159 (264 wide), close at 431/15. */
	.map-card {
		bottom: 1.5rem;
		gap: 0;
		width: 30rem; /* 480 */
		min-height: 10.6875rem; /* 171 */
		padding: 0.9375rem 3.5rem 1rem 1.9375rem; /* title 16 down, with the border */
	}

	.map-card__side {
		gap: 1.25rem; /* 20 */
		width: 6.1875rem; /* 99: to the text column at 159 */
		margin-right: 1.8125rem;
	}

	.map-card .project-tag {
		font: var(--f-subtitle-m);
	}

	.map-card__icon {
		width: 5.25rem; /* 84 */
		height: 5.25rem;
	}

	.map-card__body {
		gap: 1rem;
		width: 16.5rem; /* 264 */
		padding-top: 0;
	}

	.map-card__meta {
		gap: 0.5rem;
	}

	.map-card__title {
		font: var(--f-subtitle-l);
	}

	.map-card__application,
	.map-card__row {
		font: var(--f-subtitle-m);
	}

	/* Dialogs: 720 wide centred sheets, grey, radius 20, 480 content column. */
	.map-sheet {
		width: 45rem; /* 720 */
		max-height: calc(100% - 4rem);
		margin: auto;
		background-color: var(--c-bg-grey);
		border-radius: var(--r-l);
		box-shadow: 0 0 100px rgba(0, 0, 0, 0.05);
	}

	.map-sheet__close {
		top: 1.5rem;
		right: 1.5rem;
		width: 2rem;
		height: 2rem;
	}

	.map-sheet__grabber {
		display: none;
	}

	.map-sheet__actions {
		padding: 1rem 7.5rem; /* 16 120 */
	}

	.map-filters {
		position: fixed;
		inset: 0;
		height: 44.9375rem; /* 719 */
	}

	.map-filters__content {
		width: 30rem;
		padding: 1.5rem 0 0;
		margin-inline: auto;
		gap: 1.5rem;
	}

	.map-filters__level {
		gap: 0.5rem;
	}

	/* Pane (desktop/livemap/4): 747 tall, Back row on top, text at 52 and
	 * 16px above the search; the close moves up to line up with Back. */
	.map-filters--pane {
		height: 46.6875rem; /* 747 */
	}

	.map-filters--pane .map-filters__content {
		gap: 1rem;
		padding-top: 3.25rem; /* 52 */
	}

	.map-filters--pane .map-sheet__close {
		top: 0.875rem; /* 14 */
	}

	.map-filters__back {
		top: 1rem;
	}

	.map-filters__list {
		margin-right: -7.5rem;
		padding-right: 7.5rem;
	}

	.project-modal {
		width: 45rem;
	}

	.project-modal__hero {
		height: 19.6875rem; /* 315 */
		place-items: start center;
	}

	.project-modal__icon {
		width: 13.125rem; /* 210 */
		height: 13.125rem;
		margin-top: 2rem;
	}

	.project-modal__tag {
		top: 15.625rem; /* 250 */
		left: 7.5rem; /* 120 */
		font: var(--f-subtitle-l);
	}

	.project-modal__hero .map-sheet__close {
		top: 2rem;
		right: 2rem;
	}

	.project-modal__body {
		width: 30rem;
		padding: 1.5rem 0;
		margin-inline: auto;
	}

	.project-modal__actions {
		flex-direction: row;
		gap: 0.625rem;
		padding: 1rem 7.5rem;
	}
}

/* Preview-only note (no tiles): top left of the map, seen without scrolling. */
.live-map__note {
	position: absolute;
	left: 1.25rem;
	top: 1.25rem;
	z-index: 500;
	max-width: calc(100% - 6rem);
	padding: 0.5rem 0.875rem;
	font: var(--f-subtitle-s);
	color: var(--c-text-dark);
	background-color: rgba(255, 255, 255, .92);
	border: 1px solid var(--c-border-light);
	border-radius: var(--r-pill);
	pointer-events: none;
}

.live-map__note[hidden] { display: none; }
