/* ============================================================
   AskPerTask Map — app-shell layout
   ============================================================
   Layout contract
   ───────────────
   ExpertHive sets body { display:flex; flex-direction:column; height:100% }
   globally.  We inherit that and let our two direct body children
   (.apt-map-nav + .apt-map-app) divide the full viewport height:

     body.apt-page-map  (flex column, height:100%)
       ├─ .apt-map-nav   (flex-shrink:0, 60 px)
       └─ .apt-map-app   (flex:1, fills remaining height)

   The Elementor sitewide header / footer locations are suppressed via
   functions.php hooks so they produce no output on this page.
   Any stray theme wrappers are nuked defensively below.
   ============================================================ */

/* ── Suppress any stray theme / Elementor chrome ──────────── */
body.apt-page-map {
	overflow: hidden;
}

/* APT-VISUAL-SHELL-2B — admin-bar offset.
   WP core's _admin_bar_bump_cb() (wp-includes/admin-bar.php) adds
   html { margin-top: 32px !important } (46px at its own ≤782px
   breakpoint) to make room for the fixed #wpadminbar. Because that's a
   margin — external to html's own box — rather than padding, it is not
   absorbed by border-box sizing: html's box still renders at its full
   height:100% of the viewport, then gets pushed down by the margin on
   top of that. body.apt-page-map inherits height:100% from html and
   inherits the same problem, ending up 32px/46px taller than the
   visible viewport, so body.apt-page-map's own overflow:hidden clips
   that same amount off the bottom of .apt-map-app rather than ever
   scrolling into view. Shrinking body's height by the admin-bar height
   here keeps the whole flex column inside the visible viewport. */
body.admin-bar.apt-page-map {
	height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar.apt-page-map {
		height: calc(100% - 46px);
	}
}

/* Nuke legacy theme wrappers that could interfere with the flex layout */
body.apt-page-map .site-header,
body.apt-page-map .site-footer,
body.apt-page-map .elementor-location-header,
body.apt-page-map .elementor-location-footer,
body.apt-page-map .header-hero,
body.apt-page-map [class*="header-hero"],
body.apt-page-map .page-header,
body.apt-page-map .entry-header {
	display: none !important;
}

/* site-container and site-content may exist if the native header.php
   renders as a fallback; make them transparent so they don't add padding. */
body.apt-page-map .site-container,
body.apt-page-map .site-content {
	display: contents;
}

body.apt-page-map .site-content > .container {
	display: contents;
}

/* ============================================================
   Map app-shell nav
   ============================================================ */
.apt-map-nav {
	height: 60px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 0;
	padding: 0 20px;
	background: #fff;
	border-bottom: 1px solid #E5E7EB;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.06 );
	z-index: 50;
}

/* Logo */
.apt-map-nav__logo {
	display: flex;
	align-items: center;
	gap: 9px;
	text-decoration: none;
	color: inherit;
	flex-shrink: 0;
}

/* APT-BRAND-LOGO-1B: real logo icon (shared with the main site header —
   assets/img/askpertask-logo-header.png), height-constrained so it fits
   cleanly inside this bar's fixed 60px height without growing the nav. */
.apt-map-nav__logo-icon {
	display: block;
	height: 34px;
	width: auto;
	max-width: 44px;
	flex-shrink: 0;
}

.apt-map-nav__logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.apt-map-nav__logo-name {
	font-size: 15px;
	font-weight: 800;
	color: #1A1A1A;
	letter-spacing: -0.02em;
	font-family: 'DM Sans', -apple-system, sans-serif;
}

.apt-map-nav__logo-tag {
	font-size: 10px;
	color: #9CA3AF;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Logo hover */
.apt-map-nav__logo:hover .apt-map-nav__logo-name { color: #F2884B; }

/* Nav links */
.apt-map-nav__links {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: 20px;
	flex-shrink: 0;
}

.apt-map-nav__links a {
	font-size: 13px;
	font-weight: 500;
	color: #6B7280;
	text-decoration: none;
	padding: 6px 10px;
	border-radius: 6px;
	transition: color 0.13s, background 0.13s;
	white-space: nowrap;
}

.apt-map-nav__links a:hover {
	color: #1A1A1A;
	background: #F3F4F6;
}

.apt-map-nav__links a[aria-current="page"] {
	color: #1A1A1A;
	font-weight: 600;
	background: #F3F4F6;
}

/* Divider between logo and location */
.apt-map-nav__divider {
	width: 1px;
	height: 20px;
	background: #E5E7EB;
	margin: 0 16px 0 20px;
	flex-shrink: 0;
}

/* Location chip */
.apt-map-nav__location {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	background: #F9FAFB;
	border: 1.5px solid #E5E7EB;
	border-radius: 7px;
	padding: 5px 10px;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: border-color 0.13s, background 0.13s;
	-webkit-appearance: none;
}

.apt-map-nav__location:hover {
	border-color: #D1D5DB;
	background: #F3F4F6;
}

.apt-map-nav__location svg {
	color: #F2884B;
	flex-shrink: 0;
}

.apt-map-nav__location-chevron {
	color: #9CA3AF;
}

/* Search field */
.apt-map-nav__search-wrap {
	flex: 1;
	max-width: 340px;
	min-width: 0;
	position: relative;
	margin: 0 16px;
}

.apt-map-nav__search-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY( -50% );
	color: #9CA3AF;
	pointer-events: none;
	display: flex;
	align-items: center;
}

/* Scoped to the wrapper (not just the bare class) so this beats HiveTheme's
   generic `input[type="search"]` padding reset (element+attribute selector,
   specificity 0-1-1 > a single class's 0-1-0) without !important or touching
   the parent theme. That vendor rule was silently collapsing our 32px
   left reserve for the icon down to 16px, causing icon/text overlap. */
.apt-map-nav__search-wrap .apt-map-nav__search-input {
	display: block;
	width: 100%;
	padding: 7px 12px 7px 32px;
	font-size: 13px;
	color: #1A1A1A;
	background: #F9FAFB;
	border: 1.5px solid #E5E7EB;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
	font-family: inherit;
}

.apt-map-nav__search-input::placeholder {
	color: #9CA3AF;
}

.apt-map-nav__search-input:focus {
	border-color: #2D6CDF;
	background: #fff;
	box-shadow: 0 0 0 3px rgba( 45, 108, 223, 0.1 );
}

/* Spacer pushes actions to the right */
.apt-map-nav__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.apt-map-nav__login {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	text-decoration: none;
	padding: 7px 12px;
	border-radius: 7px;
	border: 1.5px solid #E5E7EB;
	transition: border-color 0.13s, color 0.13s;
}

.apt-map-nav__login:hover {
	border-color: #9CA3AF;
	color: #1A1A1A;
}

.apt-map-nav__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: #1A1A1A;
	padding: 7px 14px;
	border-radius: 7px;
	text-decoration: none;
	transition: background 0.13s;
	white-space: nowrap;
}

.apt-map-nav__cta:hover {
	background: #2D2D2D;
	color: #fff;
	text-decoration: none;
}

/* ── Three-column app wrapper ───────────────────────────────── */
.apt-map-app {
	flex: 1;
	display: flex;
	flex-direction: row;
	overflow: hidden;
	min-height: 0;
	background: #F7F8F7;
}

/* ============================================================
   Left sidebar — Browse + notice
   ============================================================ */
.apt-map-sidebar {
	width: 240px;
	flex-shrink: 0;
	border-right: 1px solid #E5E7EB;
	background: #fff;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: #E5E7EB transparent;
	z-index: 2;
}

.apt-map-browse {
	padding: 20px 14px 14px;
}

.apt-map-browse__header {
	margin-bottom: 14px;
}

.apt-map-browse__title {
	font-size: 16px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0 0 2px;
	font-family: 'DM Sans', sans-serif;
}

.apt-map-browse__sub {
	font-size: 11px;
	color: #9CA3AF;
	margin: 0;
	line-height: 1.4;
}

/* Layer buttons — vertical list */
.apt-map-layers {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.apt-map-layer-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	border: 1.5px solid transparent;
	background: transparent;
	color: #374151;
	cursor: pointer;
	width: 100%;
	text-align: left;
	transition: background 0.14s, border-color 0.14s;
	-webkit-appearance: none;
}

.apt-map-layer-btn:hover {
	background: #F9FAFB;
	border-color: #E5E7EB;
}

.apt-map-layer-btn:focus-visible {
	outline: 2px solid #2D6CDF;
	outline-offset: 2px;
}

/* Cleaner selected row (APT-LIVE-MAP-VISUAL-PREVIEW-1A): soft lift so the
   active row reads as "premium", not just a tinted/bordered box. */
.apt-map-layer-btn.is-active {
	box-shadow: 0 4px 10px -6px rgba( 0, 0, 0, 0.22 );
}

/* Stronger title hierarchy + cleaner count treatment on the active row —
   colour is set per-layer below alongside the existing tint/border rules. */
.apt-map-layer-btn.is-active .apt-map-layer-btn__label {
	font-weight: 700;
}
.apt-map-layer-btn.is-active .apt-map-layer-btn__count {
	background: #fff;
	border-radius: 999px;
	padding: 1px 7px;
}

/* Icon bubble */
.apt-map-layer-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	flex-shrink: 0;
	background: #F3F4F6;
	color: #9CA3AF;
	transition: background 0.14s, color 0.14s;
}

/* Text block */
.apt-map-layer-btn__text {
	flex: 1;
	min-width: 0;
}

.apt-map-layer-btn__label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1A1A1A;
	line-height: 1.3;
}

.apt-map-layer-btn__desc {
	display: block;
	font-size: 11px;
	color: #9CA3AF;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Count / soon badges */
.apt-map-layer-btn__count {
	font-size: 13px;
	font-weight: 700;
	color: #D1D5DB;
	min-width: 20px;
	text-align: right;
	flex-shrink: 0;
}

.apt-map-layer-btn__soon {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #9CA3AF;
	background: #F3F4F6;
	border-radius: 999px;
	padding: 1px 7px;
	line-height: 1.5;
	flex-shrink: 0;
}

/* ── Idle-state icon tint per layer (APT-LIVE-MAP-VISUAL-PREVIEW-1A) ──
   Icons use fill="currentColor" server-side (page-map.php), so the tint
   is set purely here via background+color — no PHP/markup change needed.
   .is-active rules below have higher specificity (3 classes vs 2) and
   always win regardless of source order. ── */
.apt-map-layer-btn--requests .apt-map-layer-btn__icon         { background: #EFF8F2; color: #2F8F5B; }
.apt-map-layer-btn--helpers .apt-map-layer-btn__icon          { background: #F3F0FA; color: #7B57C8; }
.apt-map-layer-btn--professionals .apt-map-layer-btn__icon    { background: #EEF4FD; color: #3F7EDB; }
.apt-map-layer-btn--marketplace .apt-map-layer-btn__icon      { background: #FFF4E5; color: #E58A22; }
.apt-map-layer-btn--stores .apt-map-layer-btn__icon           { background: #F2F4F6; color: #6F7A87; }
.apt-map-layer-btn--local_businesses .apt-map-layer-btn__icon { background: #FAF0EA; color: #C06A3A; }

.apt-map-layer-btn.is-soon .apt-map-layer-btn__icon {
	background: #F3F4F6;
	color: #9CA3AF;
}

/* ── Active states per layer ── */
.apt-map-layer-btn--requests.is-active {
	background: #EFF8F2;
	border-color: #2F8F5B;
}
.apt-map-layer-btn--requests.is-active .apt-map-layer-btn__icon {
	background: #2F8F5B;
	color: #fff;
}
.apt-map-layer-btn--requests.is-active .apt-map-layer-btn__count { color: #236E45; }
.apt-map-layer-btn--requests.is-active .apt-map-layer-btn__label { color: #236E45; }

.apt-map-layer-btn--helpers.is-active {
	background: #F3F0FA;
	border-color: #7B57C8;
}
.apt-map-layer-btn--helpers.is-active .apt-map-layer-btn__icon {
	background: #7B57C8;
	color: #fff;
}
.apt-map-layer-btn--helpers.is-active .apt-map-layer-btn__count { color: #5A3FB0; }
.apt-map-layer-btn--helpers.is-active .apt-map-layer-btn__label { color: #5A3FB0; }

.apt-map-layer-btn--professionals.is-active {
	background: #EEF4FD;
	border-color: #3F7EDB;
}
.apt-map-layer-btn--professionals.is-active .apt-map-layer-btn__icon {
	background: #3F7EDB;
	color: #fff;
}
.apt-map-layer-btn--professionals.is-active .apt-map-layer-btn__count { color: #2E61B3; }
.apt-map-layer-btn--professionals.is-active .apt-map-layer-btn__label { color: #2E61B3; }

.apt-map-layer-btn--marketplace.is-active {
	background: #FFF4E5;
	border-color: #E58A22;
}
.apt-map-layer-btn--marketplace.is-active .apt-map-layer-btn__icon {
	background: #E58A22;
	color: #fff;
}
.apt-map-layer-btn--marketplace.is-active .apt-map-layer-btn__count { color: #B96A12; }
.apt-map-layer-btn--marketplace.is-active .apt-map-layer-btn__label { color: #B96A12; }

.apt-map-layer-btn--stores.is-active {
	background: #F2F4F6;
	border-color: #6F7A87;
}
.apt-map-layer-btn--stores.is-active .apt-map-layer-btn__icon {
	background: #6F7A87;
	color: #fff;
}
.apt-map-layer-btn--stores.is-active .apt-map-layer-btn__count { color: #4F5965; }
.apt-map-layer-btn--stores.is-active .apt-map-layer-btn__label { color: #4F5965; }

.apt-map-layer-btn--local_businesses.is-active {
	background: #FAF0EA;
	border-color: #C06A3A;
}
.apt-map-layer-btn--local_businesses.is-active .apt-map-layer-btn__icon {
	background: #C06A3A;
	color: #fff;
}
.apt-map-layer-btn--local_businesses.is-active .apt-map-layer-btn__count { color: #8F4A22; }
.apt-map-layer-btn--local_businesses.is-active .apt-map-layer-btn__label { color: #8F4A22; }

/* Coming-soon dimmed */
.apt-map-layer-btn.is-soon {
	opacity: 0.55;
	cursor: default;
}
.apt-map-layer-btn.is-soon:hover {
	background: transparent;
	border-color: transparent;
}

/* Soon pulse animation */
.apt-map-layer-btn.is-pulsing-soon {
	animation: apt-soon-pulse 0.3s ease forwards;
}
.apt-map-layer-btn.is-pulsing-soon .apt-map-layer-btn__soon {
	background: #FEE2E2;
	color: #EF4444;
}
@keyframes apt-soon-pulse {
	0%   { transform: scale( 1 ); }
	40%  { transform: scale( 1.04 ); }
	100% { transform: scale( 1 ); }
}


/* ============================================================
   Filters section — Category dropdown (extensible for future
   Distance / Availability / Verified-only rows)
   ============================================================ */
.apt-map-filters {
	padding: 14px;
	border-top: 1px solid #F3F4F6;
}

.apt-map-filters__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.apt-map-filters__title {
	font-size: 10px;
	font-weight: 700;
	color: #D1D5DB;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

.apt-map-filters__clear {
	font-size: 11px;
	font-weight: 600;
	color: #2D6CDF;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	-webkit-appearance: none;
}
.apt-map-filters__clear:hover { color: #1A4BB5; text-decoration: underline; }

/* Individual filter row */
.apt-map-filter {
	margin-bottom: 8px;
}
.apt-map-filter:last-child { margin-bottom: 0; }

.apt-map-filter__label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #6B7280;
	margin-bottom: 5px;
}

/* Custom select with chevron */
.apt-map-filter__select-wrap {
	position: relative;
}

.apt-map-filter__select {
	display: block;
	width: 100%;
	padding: 7px 30px 7px 10px;
	font-size: 13px;
	color: #1A1A1A;
	background: #F9FAFB;
	border: 1.5px solid #E5E7EB;
	border-radius: 7px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color 0.14s, background 0.14s;
	outline: none;
	line-height: 1.4;
}

.apt-map-filter__select:focus {
	border-color: #2D6CDF;
	background: #fff;
}

.apt-map-filter__select:disabled {
	opacity: 0.45;
	cursor: default;
}

/* Active filter state — subtle tint on the select */
.apt-map-filter__select.has-value {
	border-color: #2D6CDF;
	background: #EAF1FD;
	color: #1A4BB5;
	font-weight: 600;
}

.apt-map-filter__chevron {
	position: absolute;
	right: 9px;
	top: 50%;
	transform: translateY( -50% );
	color: #9CA3AF;
	pointer-events: none;
	display: flex;
	align-items: center;
}

/* ── Verified toggle (Row 3 of filters) ── */
.apt-map-filter__toggle-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.apt-map-filter__toggle-label {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	flex-shrink: 0;
}

.apt-map-filter__toggle-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.apt-map-filter__toggle-track {
	display: inline-flex;
	align-items: center;
	width: 32px;
	height: 18px;
	background: #E5E7EB;
	border-radius: 999px;
	transition: background 0.15s;
	position: relative;
	flex-shrink: 0;
}

.apt-map-filter__toggle-thumb {
	position: absolute;
	left: 2px;
	width: 14px;
	height: 14px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.2 );
	transition: left 0.15s;
}

.apt-map-filter__toggle-input:checked + .apt-map-filter__toggle-track {
	background: #2D6CDF;
}

.apt-map-filter__toggle-input:checked + .apt-map-filter__toggle-track .apt-map-filter__toggle-thumb {
	left: 16px;
}

.apt-map-filter__toggle-input:focus-visible + .apt-map-filter__toggle-track {
	outline: 2px solid #2D6CDF;
	outline-offset: 2px;
}

/* ── Approximate locations notice ── */
.apt-map-sidebar__notice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 14px;
	margin-top: auto;
	border-top: 1px solid #F3F4F6;
	background: #FAFAFA;
}

.apt-map-sidebar__notice svg {
	flex-shrink: 0;
	color: #D1D5DB;
	margin-top: 1px;
}

.apt-map-sidebar__notice strong {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #6B7280;
	margin-bottom: 2px;
}

.apt-map-sidebar__notice p {
	font-size: 11px;
	color: #9CA3AF;
	margin: 0;
	line-height: 1.4;
}

/* ============================================================
   Centre — map canvas + legend bar
   ============================================================ */
.apt-map-center {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-width: 0;
}

.apt-map-canvas-wrap {
	flex: 1;
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#apt-map-canvas {
	flex: 1;
	width: 100%;
	min-height: 200px;
}

.apt-page-map .leaflet-container {
	z-index: 1;
}

/* ── Map legend bar ── */
.apt-map-legend {
	height: 42px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 0 16px;
	background: #fff;
	border-top: 1px solid #E5E7EB;
	overflow-x: auto;
	scrollbar-width: none;
}
.apt-map-legend::-webkit-scrollbar { display: none; }

.apt-map-legend__label {
	font-size: 10px;
	font-weight: 700;
	color: #D1D5DB;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	white-space: nowrap;
	flex-shrink: 0;
}

.apt-map-legend__item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #6B7280;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ============================================================
   Right — Results panel
   ============================================================ */
.apt-map-results {
	width: 300px;
	box-sizing: border-box;
	flex-shrink: 0;
	border-left: 1px solid #E5E7EB;
	background: #fff;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 2;
}

.apt-map-results__header {
	padding: 13px 16px;
	border-bottom: 1px solid #E5E7EB;
	background: #fff;
	flex-shrink: 0;
}

.apt-map-results__count {
	font-size: 13px;
	font-weight: 600;
	color: #6B7280;
}

.apt-map-results__count strong {
	color: #1A1A1A;
}

.apt-map-results__list {
	flex: 1;
	box-sizing: border-box;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #E5E7EB transparent;
}

/* ── Result cards ── */
.apt-result-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 13px 16px;
	text-decoration: none;
	color: inherit;
	border-top: 1px solid transparent;
	border-bottom: 1px solid #F3F4F6;
	box-sizing: border-box;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-width 0.2s ease;
	cursor: pointer;
}

/* RIGHT-PANEL CLIPPING FIX (MAP-PIN-CATEGORY-REFINEMENT-1A) — desktop only.
   .apt-map-results is a fixed 300px column with overflow:hidden here; the
   selected card's translateX(-14px) scale(1.024) lift + its shadow need
   real "runway" so they're not clipped by that edge. Reserve horizontal
   padding on the two containers, cancelled back to the original
   edge-to-edge look with a matching negative margin on their children, so
   the resting (non-selected) layout is pixel-identical to before — the
   reserve only matters once a card actually transforms.
   Scoped to >900px deliberately: below that, .apt-map-results becomes a
   full-width block stacked under the map (see the ≤900px rules further
   down) with overflow:visible — there is no clipping ancestor to guard
   against there, and reusing this same reserve at full container width
   was actively wrong: it pushed the selected card to a negative `left`,
   off the left edge of the viewport (confirmed via real 820px/390px
   measurements — this is the "still clipped" bug this pass fixes). */
@media ( min-width: 901px ) {
	.apt-map-results {
		padding: 0 64px;
	}
	.apt-map-results__header {
		margin: 0 -64px;
	}
	.apt-map-results__list {
		margin: 0 -64px;
		/* Vertical reserve is asymmetric: the selected card's box-shadow
		   (0 18px 40px + 0 6px 14px) reaches ~22px above and ~58px below
		   the card. 24px already covers the top (confirmed clean via
		   screenshot); the bottom needs real room or .apt-map-results__list's
		   own overflow-y:auto hard-clips the shadow on any card selected
		   near the end of the list — the "still clipped" bug this reserve
		   closes. Top left intentionally unchanged to avoid adding visible
		   blank space where none was needed. */
		padding: 24px 64px 64px;
	}
	.apt-result-card {
		margin: 0 -64px;
	}
}

/* Hover — a small category tint + very subtle lift, deliberately weaker
   than .is-selected below so the two states stay unmistakably different.
   :not(.is-selected) guards against a hovered-and-selected card ever
   reading as "just hover" regardless of stylesheet source order. */
.apt-result-card:hover:not(.is-selected) {
	background: #FAFBFD;
	transform: translateY( -1px );
	box-shadow: 0 2px 6px rgba( 15, 23, 42, 0.06 );
	text-decoration: none;
	color: inherit;
}

.apt-result-card--requests:hover:not(.is-selected)         { background: #DDEFE3; }
.apt-result-card--helpers:hover:not(.is-selected)           { background: #E8E1F6; }
.apt-result-card--professionals:hover:not(.is-selected)     { background: #DDE8FA; }
.apt-result-card--marketplace:hover:not(.is-selected)       { background: #FBE7CC; }
.apt-result-card--stores:hover:not(.is-selected)            { background: #E5E8EC; }
.apt-result-card--local_businesses:hover:not(.is-selected)  { background: #F1DFD4; }

.apt-result-card__avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	overflow: hidden;
}

/* Square / rounded avatars for demo-layer items */
.apt-result-card__avatar--square {
	border-radius: 10px;
}

/* Real photo inside avatar */
.apt-result-card__avatar--photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Emoji thumbnail */
.apt-result-card__emoji {
	font-size: 22px;
	line-height: 1;
	user-select: none;
}

/* Avatar colour per layer — set inline via JS; these are fallbacks */
.apt-result-card--requests .apt-result-card__avatar      { background: #2F8F5B; }
.apt-result-card--helpers .apt-result-card__avatar       { background: #7B57C8; }
.apt-result-card--professionals .apt-result-card__avatar { background: #3F7EDB; }
.apt-result-card--marketplace .apt-result-card__avatar   { background: #FFF4E5; }
.apt-result-card--stores .apt-result-card__avatar        { background: #F2F4F6; }
.apt-result-card--local_businesses .apt-result-card__avatar { background: #C06A3A; }

.apt-result-card__body {
	flex: 1;
	min-width: 0;
	padding-top: 1px;
}

.apt-result-card__title {
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
	margin: 0 0 4px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* Taxonomy label (e.g. "Gardening & Outdoor Jobs", "Car & Vehicle Services")
   — REFINEMENT PASS 2: deliberately neutral, the SAME for every layer. This
   is a service/taxonomy category, not the object family — it must never
   inherit Requests green, Quick Task amber, or any other family/type
   colour, so family and taxonomy stay visually separated. JS no longer
   sets an inline colour on this element (see buildCardBody() /
   buildResultCard() in apt-map.js) — this rule is the only source now. */
.apt-result-card__cat {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 1px 6px;
	border-radius: 999px;
	margin-bottom: 4px;
	color: #46515E;
	background: #F3F5F7;
	border: 1px solid #E2E6EA;
}

.apt-result-card__area {
	font-size: 11px;
	color: #9CA3AF;
	display: flex;
	align-items: center;
	gap: 3px;
	margin-top: 2px;
}

.apt-result-card__area svg {
	flex-shrink: 0;
}

/* Title row — title + type badge side by side */
.apt-result-card__title-row {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin-bottom: 5px;
}

.apt-result-card__title-row .apt-result-card__title {
	margin-bottom: 0;
	flex: 1;
}

.apt-type-badge {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 2px 6px;
	border-radius: 999px;
	white-space: nowrap;
	flex-shrink: 0;
	margin-top: 1px;
}

/* ASKPERTASK-MARKETPLACE-MAP-PROMOTION-1A: same neutral gold "Featured"
   treatment as .apt-popup__promo-tag — see that rule's comment. */
.apt-result-card__promo-tag {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 2px 6px;
	border-radius: 999px;
	white-space: nowrap;
	flex-shrink: 0;
	margin-top: 1px;
	color: #8A5A00;
	background: #FFF3D6;
	border: 1px solid #F5D98C;
}

.apt-result-card--promoted {
	box-shadow: inset 3px 0 0 #F5B400;
}

/* Rating row */
.apt-result-card__rating {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #F59E0B;
	margin-bottom: 3px;
}

.apt-result-card__rating em {
	color: #9CA3AF;
	font-style: normal;
	font-weight: 400;
}

/* Generic meta line */
.apt-result-card__meta {
	display: block;
	font-size: 11px;
	color: #6B7280;
	margin-bottom: 3px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Price (marketplace) */
.apt-result-card__price {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #B96A12;
	margin-bottom: 4px;
}

/* Chip row */
.apt-result-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 5px;
}

.apt-chip {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 999px;
	background: #F3F4F6;
	color: #6B7280;
	border: 1px solid #E5E7EB;
}

.apt-chip--verified  { background: #EAFAF1; color: #196940; border-color: #6EE7B7; }
.apt-chip--avail     { background: #EAF1FD; color: #1A4BB5; border-color: #BFDBFE; }
.apt-chip--new       { background: #FFF4EE; color: #C4611A; border-color: #FED7AA; }
.apt-chip--timing    { background: #F5F0FF; color: #5B21B6; border-color: #DDD6FE; }
.apt-chip--open      { background: #EAFAF1; color: #196940; border-color: #6EE7B7; }

/* LOCAL-PRO-PROFILE-1C: Local Business "owner_managed" status only — a real,
   auditable event (claim approval), but not verification. Deliberately blue,
   never the --verified green above, and never reused for any other Local
   Business status. See docs/local-business-directory.md. */
.apt-chip--claimed   { background: #DBEAFE; color: #1D4ED8; border-color: #BFDBFE; }

/* Selected state — base first, layer overrides after so they win the cascade.
   REFINEMENT PASS 2: background stays plain white — selection is still not
   communicated via tint. z-index 30 (shadow reads clearly over neighbouring
   flat white cards), translateX(-14px) scale(1.024) growing from the right
   edge (toward the map), an opaque 2px family-coloured border, a solid 8px
   family-coloured stripe, and a stronger two-layer shadow. Border/stripe use
   each family's own PRIMARY colour (COLORS.<layer>.pin in apt-map.js) at the
   same ~70%-alpha/solid treatment — consistent across all six, no more
   special-casing one layer. .apt-map-results and .apt-map-results__list
   both reserve horizontal padding (see above, cancelled back to the
   original edge-to-edge look via matching negative margins) so none of this
   is clipped by either container's own overflow. */
.apt-result-card.is-selected {
	position: relative;
	z-index: 30;
	background: #FFFFFF;
	border: 2px solid rgba( 63, 126, 219, 0.72 );
	box-shadow:
		inset 8px 0 0 #3F7EDB,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
	transform-origin: center right;
	transform: translateX( -14px ) scale( 1.024 );
	outline: none;
}

.apt-result-card.is-selected .apt-result-card__title {
	font-weight: 700;
	color: #0F172A;
}

.apt-result-card--requests.is-selected {
	border-color: rgba( 47, 143, 91, 0.72 );
	box-shadow:
		inset 8px 0 0 #2F8F5B,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
}
.apt-result-card--helpers.is-selected {
	border-color: rgba( 123, 87, 200, 0.72 );
	box-shadow:
		inset 8px 0 0 #7B57C8,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
}
.apt-result-card--professionals.is-selected {
	border-color: rgba( 63, 126, 219, 0.72 );
	box-shadow:
		inset 8px 0 0 #3F7EDB,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
}
.apt-result-card--marketplace.is-selected {
	border-color: rgba( 229, 138, 34, 0.72 );
	box-shadow:
		inset 8px 0 0 #E58A22,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
}
.apt-result-card--stores.is-selected {
	border-color: rgba( 111, 122, 135, 0.72 );
	box-shadow:
		inset 8px 0 0 #6F7A87,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
}
.apt-result-card--local_businesses.is-selected {
	border-color: rgba( 192, 106, 58, 0.72 );
	box-shadow:
		inset 8px 0 0 #C06A3A,
		0 18px 40px rgba( 15, 23, 42, 0.22 ),
		0 6px 14px rgba( 15, 23, 42, 0.1 );
}

/* RIGHT-PANEL CLIPPING FIX, part 2 — ≤900px, .apt-map-results is full-width
   and stacked below the map (not a right-docked 300px column), so
   "translateX(-14px) ... transform-origin: center right" no longer means
   anything ("toward the map") and — confirmed via real measurement at
   820px/390px widths — pushes the selected card to a negative `left`,
   off the left edge of the viewport entirely. Every other selected signal
   (2px family border, 8px stripe, shadow, z-index, bold title) is
   unaffected and still makes the row unmistakable; only the horizontal
   lift is swapped for a small vertical one that can never leave the
   viewport regardless of container width. */
@media ( max-width: 900px ) {
	.apt-result-card.is-selected {
		transform: translateY( -2px );
		transform-origin: center;
	}
}

/* ── Skeleton loading ── */
.apt-map-results__skeleton {
	padding: 10px 16px;
}

.apt-map-results__skeleton-item {
	height: 62px;
	background: linear-gradient( 90deg, #F3F4F6 25%, #EAECEF 50%, #F3F4F6 75% );
	background-size: 200% 100%;
	animation: apt-shimmer 1.4s infinite;
	border-radius: 8px;
	margin-bottom: 10px;
}

@keyframes apt-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ── No results state inside results panel ── */
.apt-results-empty {
	padding: 32px 20px;
	text-align: center;
	color: #9CA3AF;
}

.apt-results-empty__msg {
	font-size: 13px;
	font-weight: 600;
	color: #6B7280;
	margin: 0 0 4px;
}

.apt-results-empty__hint {
	font-size: 12px;
	color: #9CA3AF;
	margin: 0;
}

/* ============================================================
   Pins
   ============================================================ */
.apt-map-pin {
	background: transparent;
	border: none;
}

.apt-map-pin svg {
	display: block;
	filter: drop-shadow( 0 3px 6px rgba( 0, 0, 0, 0.28 ) ) drop-shadow( 0 1px 2px rgba( 0, 0, 0, 0.18 ) );
	transition: transform 0.15s ease, filter 0.15s ease;
	transform-origin: bottom center;
}

.apt-map-pin:hover svg,
.apt-map-pin:focus svg {
	transform: scale( 1.12 ) translateY( -2px );
	filter: drop-shadow( 0 5px 10px rgba( 0, 0, 0, 0.32 ) ) drop-shadow( 0 2px 4px rgba( 0, 0, 0, 0.2 ) );
}

/* ============================================================
   Popup flyout
   ============================================================ */
.apt-map-popup .leaflet-popup-content-wrapper {
	border-radius: 10px;
	box-shadow: 0 4px 18px rgba( 0, 0, 0, 0.14 );
	padding: 0;
	overflow: hidden;
}

.apt-map-popup .leaflet-popup-content {
	margin: 0;
	min-width: 210px;
}

.apt-map-popup .leaflet-popup-tip-container {
	margin-top: -1px;
}

.apt-popup {
	padding: 0;
	overflow: hidden;
}

.apt-popup__stripe {
	height: 5px;
	width: 100%;
	display: block;
}

.apt-popup__body {
	padding: 12px 16px 14px;
}

/* Taxonomy label — deliberately neutral and identical across all six
   layers, same reasoning as .apt-result-card__cat above: a service/taxonomy
   category is not the object family and must never inherit its colour. JS
   no longer sets an inline colour here (see buildPopup() in apt-map.js). */
.apt-popup__category {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	border-radius: 20px;
	padding: 2px 8px;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #46515E;
	background: #F3F5F7;
	border: 1px solid #E2E6EA;
}

/* ASKPERTASK-MARKETPLACE-MAP-PROMOTION-1A: honest "Featured" placement
   indicator only — neutral gold, never styled to resemble a verification/
   trust badge (those use green/blue elsewhere in this file). */
.apt-popup__promo-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	border-radius: 20px;
	padding: 2px 8px;
	margin: 0 6px 8px 0;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #8A5A00;
	background: #FFF3D6;
	border: 1px solid #F5D98C;
}

/* Request-type tag (Quick Task / Service Request) — same pill shape as the
   taxonomy label above, but colour is request-type, set inline via JS
   (typeC in buildPopup()), never the neutral taxonomy treatment. */
.apt-popup__type-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	border-radius: 20px;
	padding: 2px 8px;
	margin-bottom: 8px;
	margin-left: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.apt-popup__title {
	font-size: 14px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0 0 8px;
	line-height: 1.4;
}

.apt-popup__area {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #6B7280;
	margin: 0 0 12px;
}

.apt-popup__area svg {
	flex-shrink: 0;
	color: #9CA3AF;
}

.apt-popup__cta {
	display: block;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s ease;
	background: #6F7A87;
	color: #fff;
}

.apt-popup__cta:hover,
.apt-popup__cta:focus {
	opacity: 0.88;
	color: #fff;
	text-decoration: none;
}

/* Per-layer CTA colours (family, never request-type) — colour injected
   inline in JS via the un-reassigned `c` in buildPopup(). */
.apt-map-popup--requests .apt-popup__cta      { background: #2F8F5B; }
.apt-map-popup--helpers .apt-popup__cta       { background: #7B57C8; }
.apt-map-popup--professionals .apt-popup__cta { background: #3F7EDB; }
.apt-map-popup--marketplace .apt-popup__cta   { background: #E58A22; }
.apt-map-popup--stores .apt-popup__cta        { background: #6F7A87; }

/* Extra popup meta lines */
.apt-popup__meta {
	font-size: 12px;
	color: #6B7280;
	margin: 0 0 8px;
}

.apt-popup__meta--verified {
	color: #196940;
	font-weight: 600;
}

/* LOCAL-PRO-PROFILE-1C: Local Business "owner_managed" status only — see
   .apt-chip--claimed above for the same rule applied to result cards. */
.apt-popup__meta--claimed {
	color: #1D4ED8;
	font-weight: 600;
}

.apt-popup__price {
	font-size: 15px;
	font-weight: 700;
	color: #B96A12;
	margin: 0 0 8px;
}

.apt-popup__rating {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #F59E0B;
	margin: 0 0 6px;
}

.apt-popup__rating em {
	color: #9CA3AF;
	font-style: normal;
	font-weight: 400;
	font-size: 11px;
}

.apt-popup__status--open {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #196940;
	background: #EAFAF1;
	border-radius: 999px;
	padding: 1px 7px;
	margin: 0 0 8px;
}

/* Active / selected pin — coloured glow + lift */
/* REFINEMENT PASS 2 — MAP PIN CONTRAST: the white separation ring itself is
   drawn straight into the SVG path (see makePinHtml() in apt-map.js, which
   adds a stroke+paint-order trick only when `large`/active) so it survives
   over any map tile colour; this shadow is the exact value requested,
   applied on top of that. */
.apt-map-pin--active svg {
	filter: drop-shadow( 0 3px 8px rgba( 15, 23, 42, 0.28 ) );
	transform: scale( 1.08 ) translateY( -3px );
}

/* ============================================================
   Pin glow ring — hover (static) vs selected (pulsing)
   APT-LIVE-MAP-VISUAL-PREVIEW-1A
   ------------------------------------------------------------
   The glow circle is always present in the pin SVG (see
   makePinHtml() in apt-map.js) so this stays CSS-only: hidden at
   rest, a restrained static ring on hover, and only the selected
   pin gets the animated pulse — matching the Figma Make source's
   own `pulse-ring` keyframe (src/index.css) so the motion feel is
   consistent with the reference. Only ONE pin pulses at a time.
   ============================================================ */
.apt-map-pin__glow {
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

.apt-map-pin:hover .apt-map-pin__glow,
.apt-map-pin:focus .apt-map-pin__glow {
	opacity: 0.16;
	transition: opacity 0.15s ease;
}

.apt-map-pin--active .apt-map-pin__glow {
	opacity: 0.42;
	animation: apt-pin-pulse 2s cubic-bezier( 0.22, 0.61, 0.36, 1 ) infinite;
}

/* REFINEMENT PASS (same day, same colours): peak opacity and end scale both
   raised so the ring reads clearly among nearby pins — still one soft pulse,
   not a flashy ping; same easing/duration as the initial pass. */
@keyframes apt-pin-pulse {
	0%   { transform: scale( 0.9 );  opacity: 0.46; }
	70%  { transform: scale( 2.05 ); opacity: 0; }
	100% { transform: scale( 2.05 ); opacity: 0; }
}

/* ============================================================
   Promoted (Map Boost) pin — ASKPERTASK-MARKETPLACE-MAP-PROMOTION-1A
   ------------------------------------------------------------
   Deliberately restrained per batch brief: slightly larger marker
   (baked into the SVG dimensions in apt-map.js), a small neutral
   "Featured" badge, and — only where prefers-reduced-motion allows
   it — one slow, low-opacity pulse. Never the same visual weight as
   the selected/active state, never implies verification/ranking,
   never a flashing/advertising-wall treatment.
   ============================================================ */
.apt-map-pin--promoted .apt-map-pin__glow {
	opacity: 0.14;
}

@media ( prefers-reduced-motion: no-preference ) {
	.apt-map-pin--promoted:not( .apt-map-pin--active ) .apt-map-pin__glow {
		animation: apt-pin-promoted-pulse 3.6s ease-in-out infinite;
	}
}

@keyframes apt-pin-promoted-pulse {
	0%, 100% { opacity: 0.14; }
	50%      { opacity: 0.26; }
}

.apt-map-pin__promo-badge {
	fill: #f5b400;
	stroke: #fff;
	stroke-width: 1.5;
}

.apt-map-pin__promo-badge-text {
	font-size: 6px;
	fill: #fff;
	pointer-events: none;
	user-select: none;
}

/* ============================================================
   Empty state overlay (map center)
   ============================================================ */
.apt-map-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 400;
	pointer-events: none;
}

.apt-map-empty__card {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.1 );
	padding: 24px 28px;
	text-align: center;
	max-width: 300px;
	pointer-events: auto;
}

.apt-map-empty__icon {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
	color: #D1D5DB;
}

.apt-map-empty__msg {
	font-size: 15px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0 0 6px;
}

.apt-map-empty__hint {
	font-size: 13px;
	color: #6B7280;
	margin: 0;
}

/* ============================================================
   Responsive — collapse to map-first on narrow viewports
   ============================================================ */
@media ( max-width: 960px ) {
	.apt-map-results { display: none; }
}

@media ( max-width: 900px ) {
	.apt-map-nav__divider    { display: none; }
	.apt-map-nav__location   { display: none; }
	.apt-map-nav__links      { display: none; }
	.apt-map-nav__search-wrap { max-width: 200px; margin: 0 8px; }
}

@media ( max-width: 900px ) {
	.apt-map-app { flex-direction: column; }

	.apt-map-sidebar {
		width: 100%;
		height: auto;
		flex-direction: row;
		border-right: none;
		border-bottom: 1px solid #E5E7EB;
		overflow-x: auto;
		overflow-y: hidden;
		flex-shrink: 0;
	}

	.apt-map-browse {
		padding: 8px 10px;
		display: flex;
		align-items: center;
		gap: 6px;
		border-bottom: none;
		width: 100%;
	}

	.apt-map-browse__header { display: none; }

	.apt-map-layers {
		flex-direction: row;
		gap: 6px;
		flex-wrap: nowrap;
	}

	.apt-map-layer-btn {
		padding: 6px 12px;
		border-radius: 999px;
		border-color: #E5E7EB;
		background: #F9FAFB;
		white-space: nowrap;
	}

	.apt-map-layer-btn:hover { background: #F3F4F6; }

	.apt-map-layer-btn__icon {
		width: 22px;
		height: 22px;
		border-radius: 5px;
	}

	.apt-map-layer-btn__desc { display: none; }

	.apt-map-layer-btn__label { font-size: 12px; }

	.apt-map-filters { display: none; }
	.apt-map-sidebar__notice { display: none; }
}

@media ( max-width: 600px ) {
	.apt-map-legend { display: none; }
}

/* ============================================================
   Sidebar — upsell block
   ============================================================ */
.apt-map-sidebar__upsell {
	padding: 14px;
	border-top: 1px solid #F3F4F6;
	background: linear-gradient( 135deg, #FFFBF8 0%, #FFF4EE 100% );
}

.apt-map-sidebar__upsell-title {
	font-size: 10px;
	font-weight: 700;
	color: #C4611A;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 4px;
}

.apt-map-sidebar__upsell-text {
	font-size: 11px;
	color: #6B7280;
	margin: 0 0 10px;
	line-height: 1.45;
}

.apt-map-sidebar__upsell-btn {
	display: block;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: #F2884B;
	padding: 7px 12px;
	border-radius: 7px;
	text-decoration: none;
	transition: background 0.13s;
}

.apt-map-sidebar__upsell-btn:hover {
	background: #E07A3D;
	color: #fff;
	text-decoration: none;
}

/* ============================================================
   Card — initials avatar
   ============================================================ */
.apt-result-card__initials {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.01em;
	user-select: none;
	line-height: 1;
}

/* Selected-state rules consolidated above — see .apt-result-card.is-selected */

/* Card click — ripple / feedback */
.apt-result-card:active {
	background: #F0F2F5;
}

/* ============================================================
   Popup — per-layer CTA colors already in CSS above;
   category colours in .apt-map-popup--* also above.
   These are supplements.
   ============================================================ */
.apt-map-popup .leaflet-popup-content-wrapper {
	min-width: 220px;
}

/* Popup title slightly larger */
.apt-popup__title {
	font-size: 14px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0 0 6px;
	line-height: 1.35;
}

/* ============================================================
   Filter rows — responsive hide on mobile already handled
   ============================================================ */
@media ( max-width: 900px ) {
	.apt-map-sidebar__upsell { display: none; }
}

/* ============================================================
   Search input — remove WebKit built-in search decorations
   that can overlap the custom search icon
   ============================================================ */
.apt-map-nav__search-input {
	-webkit-appearance: textfield;
	appearance: textfield;
}
.apt-map-nav__search-input::-webkit-search-decoration,
.apt-map-nav__search-input::-webkit-search-cancel-button,
.apt-map-nav__search-input::-webkit-search-results-button,
.apt-map-nav__search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	display: none;
}

/* ============================================================
   Location picker — dropdown below location button
   ============================================================ */
.apt-map-nav__location-wrap {
	position: relative;
	flex-shrink: 0;
}

.apt-location-picker {
	position: absolute;
	top: calc( 100% + 8px );
	left: 0;
	z-index: 200;
	width: 304px;
	background: #fff;
	border: 1.5px solid #E5E7EB;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba( 0, 0, 0, 0.13 );
}

.apt-location-picker[hidden] { display: none; }

.apt-location-picker__inner {
	padding: 14px;
}

.apt-location-picker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.apt-location-picker__heading {
	font-size: 11px;
	font-weight: 700;
	color: #6B7280;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.apt-location-picker__close {
	background: none;
	border: none;
	cursor: pointer;
	color: #9CA3AF;
	padding: 2px;
	display: flex;
	align-items: center;
	-webkit-appearance: none;
	line-height: 1;
}
.apt-location-picker__close:hover { color: #1A1A1A; }

.apt-location-picker__search-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
}

.apt-location-picker__input {
	flex: 1;
	padding: 8px 10px;
	font-size: 13px;
	border: 1.5px solid #E5E7EB;
	border-radius: 7px;
	outline: none;
	background: #F9FAFB;
	font-family: inherit;
	min-width: 0;
	color: #1A1A1A;
}
.apt-location-picker__input:focus {
	border-color: #2D6CDF;
	background: #fff;
	box-shadow: 0 0 0 3px rgba( 45, 108, 223, 0.1 );
}
.apt-location-picker__input::placeholder { color: #9CA3AF; }

.apt-location-picker__gps-btn {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border: 1.5px solid #E5E7EB;
	border-radius: 7px;
	background: #F9FAFB;
	cursor: pointer;
	color: #2D6CDF;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-appearance: none;
	transition: background 0.13s, border-color 0.13s;
}
.apt-location-picker__gps-btn:hover { background: #EAF1FD; border-color: #2D6CDF; }
.apt-location-picker__gps-btn:disabled { opacity: 0.45; cursor: default; }

.apt-location-picker__suggestions {
	border: 1.5px solid #E5E7EB;
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
	background: #fff;
}
.apt-location-picker__suggestions[hidden] { display: none; }

.apt-location-picker__sugg {
	display: block;
	width: 100%;
	text-align: left;
	padding: 9px 12px;
	font-size: 13px;
	color: #374151;
	background: none;
	border: none;
	border-bottom: 1px solid #F3F4F6;
	cursor: pointer;
	font-family: inherit;
	-webkit-appearance: none;
	line-height: 1.35;
}
.apt-location-picker__sugg:last-child { border-bottom: none; }
.apt-location-picker__sugg:hover { background: #F9FAFB; color: #1A1A1A; }

.apt-location-picker__no-results {
	font-size: 12px;
	color: #9CA3AF;
	text-align: center;
	padding: 10px 12px;
	margin: 0;
}

.apt-location-picker__presets-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	color: #D1D5DB;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin-bottom: 7px;
}

.apt-location-picker__preset-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.apt-location-picker__preset {
	font-size: 12px;
	color: #374151;
	background: #F3F4F6;
	border: 1px solid #E5E7EB;
	border-radius: 999px;
	padding: 4px 11px;
	cursor: pointer;
	font-family: inherit;
	-webkit-appearance: none;
	transition: background 0.12s, color 0.12s;
}
.apt-location-picker__preset:hover { background: #E5E7EB; color: #1A1A1A; }

/* ── Mobile: keep picker within viewport ── */
@media ( max-width: 600px ) {
	.apt-location-picker {
		width: calc( 100vw - 32px );
		left: 50%;
		transform: translateX( -50% );
	}
}

/* ============================================================
   Role-choice modal
   ============================================================ */
.apt-role-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.apt-role-modal[hidden] { display: none; }

.apt-role-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
}

.apt-role-modal__panel {
	position: relative;
	background: #fff;
	border-radius: 16px;
	padding: 32px 28px 28px;
	max-width: 500px;
	width: 100%;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.2 );
}

.apt-role-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	background: #F3F4F6;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #6B7280;
	-webkit-appearance: none;
	transition: background 0.13s, color 0.13s;
}
.apt-role-modal__close:hover { background: #E5E7EB; color: #1A1A1A; }
.apt-role-modal__close:focus-visible { outline: 2px solid #2D6CDF; outline-offset: 2px; }

.apt-role-modal__title {
	font-size: 20px;
	font-weight: 800;
	color: #1A1A1A;
	margin: 0 0 4px;
	font-family: 'DM Sans', sans-serif;
	letter-spacing: -0.02em;
	padding-right: 40px;
}

.apt-role-modal__sub {
	font-size: 14px;
	color: #6B7280;
	margin: 0 0 22px;
}

.apt-role-modal__cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.apt-role-modal__card {
	display: flex;
	flex-direction: column;
	border: 2px solid #E5E7EB;
	border-radius: 12px;
	padding: 20px 18px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.14s, background 0.14s;
	cursor: pointer;
}
.apt-role-modal__card:hover { text-decoration: none; color: inherit; }
.apt-role-modal__card--helper:hover { border-color: #22A45D; background: #F0FFF7; }
.apt-role-modal__card--pro:hover    { border-color: #2D6CDF; background: #EAF1FD; }
.apt-role-modal__card:focus-visible { outline: 2px solid #2D6CDF; outline-offset: 2px; }

.apt-role-modal__card-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	flex-shrink: 0;
}
.apt-role-modal__card-icon--helper { background: #EAFAF1; color: #22A45D; }
.apt-role-modal__card-icon--pro    { background: #EAF1FD; color: #2D6CDF; }

.apt-role-modal__card-heading {
	font-size: 15px;
	font-weight: 700;
	color: #1A1A1A;
	margin: 0 0 6px;
}

.apt-role-modal__card-desc {
	font-size: 12px;
	color: #6B7280;
	margin: 0 0 16px;
	flex: 1;
	line-height: 1.5;
}

.apt-role-modal__card-cta {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	padding: 8px 12px;
	border-radius: 7px;
	transition: opacity 0.12s;
}
.apt-role-modal__card-cta--helper { background: #22A45D; color: #fff; }
.apt-role-modal__card-cta--pro    { background: #2D6CDF; color: #fff; }
.apt-role-modal__card:hover .apt-role-modal__card-cta { opacity: 0.88; }

@media ( max-width: 500px ) {
	.apt-role-modal__cards { grid-template-columns: 1fr; }
	.apt-role-modal__panel { padding: 24px 20px 20px; }
}

/* ============================================================
   Mobile request-type filter bar
   Inserted between the layer rail and map canvas in the column
   layout (≤900px). Hidden on desktop via the min-width query so
   removing the initial style="display:none" is safe on all sizes.
   ============================================================ */
@media ( min-width: 901px ) {
	.apt-rt-filter-mobile { display: none; }
}

@media ( max-width: 900px ) {
	.apt-rt-filter-mobile {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		gap: 6px;
		padding: 6px 12px;
		background: #fff;
		border-bottom: 1px solid #E5E7EB;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.apt-rt-filter-mobile::-webkit-scrollbar { display: none; }

	/* Slightly larger touch targets on the mobile bar */
	.apt-rt-filter-mobile .apt-rt-btn {
		padding: 6px 13px;
		font-size: 12px;
		min-height: 34px;
	}
}

/* ============================================================
   Request-type segmented filter — results panel header
   ============================================================ */
.apt-rt-filter {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.apt-rt-btn {
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1.5px solid #E5E7EB;
	background: #F9FAFB;
	color: #6B7280;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.4;
	transition: border-color 0.13s, background 0.13s, color 0.13s;
	-webkit-appearance: none;
}

.apt-rt-btn:hover {
	border-color: #D1D5DB;
	background: #F3F4F6;
	color: #1A1A1A;
}

.apt-rt-btn:focus-visible {
	outline: 2px solid #2D6CDF;
	outline-offset: 2px;
}

/* Active states — per type colour */
.apt-rt-btn[data-apt-rt=""].is-active {
	background: #EFF8F2;
	border-color: #2F8F5B;
	color: #236E45;
	font-weight: 700;
}

/* Quick Task — amber, never dark/charcoal/navy (speed & immediacy). */
.apt-rt-btn[data-apt-rt="quick_task"].is-active {
	background: #FFF4D9;
	border-color: #F2A62B;
	color: #C57B00;
	font-weight: 700;
}

.apt-rt-btn[data-apt-rt="service_request"].is-active {
	background: #E5F4EB;
	border-color: #B9DCC6;
	color: #236E45;
	font-weight: 700;
}

/* ============================================================
   Mobile map-interaction toggle — MAP-MOBILE-SCROLL-1A
   Below the project's canonical ≤900px column-layout breakpoint
   (see .apt-map-app above) the map starts scroll-first: dragging/
   zoom handlers are disabled in JS so a one-finger swipe scrolls
   the page instead of panning the map. This button is the only
   way to opt in to map interaction on that breakpoint; hidden on
   desktop, where the map keeps its normal always-interactive
   behaviour untouched.
   ============================================================ */
.apt-map-toggle {
	display: none;
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1000;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 9px 16px;
	border: none;
	border-radius: 999px;
	background: #1A1A1A;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.25);
	cursor: pointer;
	outline: none;
}

.apt-map-toggle:focus-visible {
	outline: 2px solid #2D6CDF;
	outline-offset: 2px;
}

.apt-map-toggle[aria-pressed="true"] {
	background: #2D6CDF;
}

.apt-map-toggle__hint {
	display: none;
	position: absolute;
	top: 58px;
	right: 10px;
	z-index: 999;
	max-width: 190px;
	padding: 6px 10px;
	border-radius: 8px;
	background: rgba(26, 26, 26, 0.85);
	color: #fff;
	font-size: 11px;
	line-height: 1.35;
	text-align: right;
	pointer-events: none;
}

@media ( max-width: 900px ) {
	.apt-map-toggle { display: inline-flex; }
	.apt-map-toggle__hint:not(.is-hidden) { display: block; }
}

/* ============================================================
   Mobile document-flow fix — MAP-MOBILE-SCROLL-1A-FIX1
   ============================================================
   FIX0 stopped Leaflet from capturing touch gestures, but the
   document itself was still architecturally non-scrollable:
   body.apt-page-map is overflow:hidden and every ancestor down to
   #apt-map-canvas uses flex:1 inside that fixed viewport, so the
   map always consumed 100% of the remaining height with nothing
   reachable below it. Below the project's canonical ≤900px
   breakpoint this section removes the scroll lock, gives the map
   a bounded height, and reveals the existing (already-populated)
   results panel below it in normal document flow — turning /map/
   into a genuinely scrollable map-and-results page. Desktop is
   untouched: its rules all live above 900px and still apply there.
   ============================================================ */
@media ( max-width: 900px ) {
	/* Un-lock the document. Source order here intentionally comes
	   after the desktop/admin-bar overflow:hidden + calc() height
	   rules earlier in this file, so these mobile rules win at
	   equal specificity for any width this query matches. */
	body.apt-page-map {
		height: auto;
		min-height: 100%;
		overflow: visible;
	}

	body.admin-bar.apt-page-map {
		height: auto;
		min-height: calc(100% - 32px);
	}
}

@media screen and ( max-width: 782px ) {
	body.admin-bar.apt-page-map {
		height: auto;
		min-height: calc(100% - 46px);
	}
}

@media ( max-width: 900px ) {
	.apt-map-app {
		flex: none;
		height: auto;
		overflow: visible;
	}

	.apt-map-center {
		flex: none;
		height: auto;
		overflow: visible;
	}

	/* The map keeps a deliberate, bounded height instead of filling
	   the rest of the viewport — tall enough to use, short enough
	   that the results below are visibly discoverable on load.
	   50vh fallback for browsers without dvh support (e.g. Safari
	   <15.4); the clamp()/dvh rule overrides it where supported. */
	.apt-map-canvas-wrap {
		flex: none;
		height: 50vh;
		height: clamp( 360px, 58dvh, 620px );
		overflow: hidden;
	}

	#apt-map-canvas {
		flex: none;
		height: 100%;
		min-height: 0;
	}

	/* Results panel — same component as desktop, just reflowed:
	   full-width, height determined by its own content (no inner
	   fixed-height scrollbox), stacked below the map so the page
	   itself scrolls through it. Higher specificity than the
	   plain .apt-map-results/.apt-map-results__list selectors
	   above (which include an unrelated ≤960px display:none used
	   for the in-between desktop-layout width band) so this wins
	   deterministically regardless of source order. */
	body.apt-page-map .apt-map-results {
		display: flex;
		width: 100%;
		flex: none;
		height: auto;
		overflow: visible;
		border-left: none;
		border-top: 1px solid #E5E7EB;
	}

	body.apt-page-map .apt-map-results__list {
		flex: none;
		overflow-y: visible;
		height: auto;
	}

	/* #apt-rt-filter-mobile (above the map) already covers request-
	   type filtering on mobile; hide the results panel's own copy
	   of the same segmented control so it isn't shown twice.
	   !important is required because apt-map.js toggles this exact
	   element's inline style.display based on active layer — a
	   plain stylesheet rule cannot win against that inline style. */
	#apt-rt-filter {
		display: none !important;
	}
}
