/* ===========================================================
   ONHYM Map — front-end styles (design system)
   Palette: teal #2c8d7d / #0f766e, deep green #466a61,
   olive #757c42, sand #e0ddce, ink #23303a
   =========================================================== */

.onhym-map-wrap {
	--onhym-teal: #2c8d7d;
	--onhym-teal-dark: #0f766e;
	--onhym-green: #466a61;
	--onhym-sand: #e0ddce;
	--onhym-ink: #23303a;
	--onhym-muted: #64748b;
	--onhym-radius: 12px;
	--onhym-shadow: 0 6px 24px rgba(15, 118, 110, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--onhym-radius);
	box-shadow: var(--onhym-shadow);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.4;
}

/* Neutralise theme/Elementor styling that leaks into our UI. */
.onhym-map-wrap button.onhym-icon-btn,
.onhym-map-wrap button.onhym-sidebar-show,
.onhym-map-wrap button.onhym-opt-toggle,
.onhym-map-wrap button.onhym-tool-btn,
.onhym-map-wrap button.onhym-style-btn,
.onhym-map-wrap button.onhym-pp-dot,
.onhym-map-wrap button.onhym-pp-nav-btn {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	min-width: 0;
	min-height: 0;
	margin: 0;
	text-shadow: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}

.onhym-map-wrap .onhym-sidebar,
.onhym-map-wrap .onhym-opt {
	font-size: 12px;
	line-height: 1.35;
	color: var(--onhym-ink);
}

.onhym-map-wrap .onhym-sidebar label,
.onhym-map-wrap .onhym-opt label {
	margin: 0;
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
	display: flex;
}

.onhym-map-canvas {
	width: 100%;
	min-height: 320px;
	border-radius: var(--onhym-radius);
	overflow: hidden;
}

.onhym-map-error {
	padding: 16px;
	background: #fff4f4;
	color: #9b1c1c;
	border: 1px solid #f5c2c2;
	border-radius: 10px;
	font-size: 14px;
}

/* ---------- Optional title header ---------- */
.onhym-map-title {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(6px);
	color: var(--onhym-green);
	font-weight: 700;
	font-size: 14px;
	padding: 8px 18px;
	border-radius: 999px;
	box-shadow: var(--onhym-shadow);
	z-index: 4;
	max-width: 60%;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

/* ---------- Popups ---------- */
.mapboxgl-popup.onhym-pp {
	z-index: 8;
}

.mapboxgl-popup.onhym-pp .mapboxgl-popup-content {
	border-radius: 14px;
	padding: 0;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 14px 38px rgba(15, 118, 110, 0.24), 0 2px 8px rgba(0, 0, 0, 0.14);
	border: 1px solid rgba(15, 118, 110, 0.12);
}

/* Tip colour follows whatever edge of the card it touches. */
.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
	border-bottom-color: var(--onhym-teal-dark);
}

.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
	border-top-color: #fff;
}

.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
	border-right-color: var(--onhym-teal-dark);
}

.mapboxgl-popup.onhym-pp.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
	border-left-color: var(--onhym-teal-dark);
}

.onhym-pp-card {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	line-height: 1.35;
	color: var(--onhym-ink);
	width: 300px;
	max-width: 100%;
}

.onhym-pp-head {
	background: linear-gradient(135deg, var(--onhym-teal), var(--onhym-teal-dark));
	color: #fff;
	padding: 11px 38px 11px 14px;
}

.onhym-pp-layer {
	font-size: 9.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
	opacity: .82;
	line-height: 1.3;
}

.onhym-pp-title {
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.25;
	margin-top: 3px;
	color: #fff;
}

.onhym-pp-body {
	max-height: 240px;
	overflow-y: auto;
}

.onhym-pp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 11.5px;
	margin: 0;
	background: #fff;
}

.onhym-pp-table tr {
	border-bottom: 1px solid #eef3f2;
}

.onhym-pp-table tr:last-child {
	border-bottom: none;
}

.onhym-pp-table tr:hover {
	background: #f3faf8;
}

.onhym-pp-table th {
	text-align: left;
	color: var(--onhym-muted);
	font-weight: 600;
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: .3px;
	padding: 7px 8px 7px 14px;
	vertical-align: top;
	width: 42%;
	background: #fafcfc;
	border-right: 1px solid #eef3f2;
}

.onhym-pp-table td {
	padding: 7px 14px 7px 10px;
	color: var(--onhym-ink);
	font-weight: 500;
	word-break: break-word;
}

.onhym-pp-table a {
	color: var(--onhym-teal-dark);
	font-weight: 600;
}

/* URL values are rendered as a compact button instead of a raw link. */
.onhym-pp-table a.onhym-pp-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border: 1px solid #cfe9e5;
	border-radius: 999px;
	background: #f0fbf9;
	color: var(--onhym-teal-dark);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.onhym-pp-table a.onhym-pp-link:hover,
.onhym-pp-table a.onhym-pp-link:focus-visible {
	background: var(--onhym-teal-dark);
	border-color: var(--onhym-teal-dark);
	color: #fff;
	text-decoration: none;
}

.onhym-pp-table a.onhym-pp-link svg {
	flex: 0 0 auto;
	opacity: .8;
}

/* Single footer bar: dots (stacked features) + arrows (browse the layer). */
.onhym-pp-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 6px 5px 12px;
	background: #f4f9f8;
	border-top: 1px solid #e2ecea;
}

.onhym-pp-foot.is-solo {
	justify-content: center;
	padding-left: 6px;
}

.onhym-pp-dots {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 0 0 auto;
}

.onhym-map-wrap .onhym-pp-dot {
	width: 8px;
	height: 8px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c2d6d2;
	background-image: none;
	box-shadow: none;
	cursor: pointer;
	transition: background .15s, transform .15s;
}

.onhym-map-wrap .onhym-pp-dot:hover,
.onhym-map-wrap .onhym-pp-dot:focus {
	background: var(--onhym-teal);
	background-image: none;
	outline: none;
	transform: scale(1.25);
}

.onhym-map-wrap .onhym-pp-dot.is-on {
	background: var(--onhym-teal-dark);
	background-image: none;
	width: 18px;
	border-radius: 5px;
}

.onhym-pp-hint {
	font-size: 10px;
	font-weight: 600;
	color: var(--onhym-muted);
	padding-right: 6px;
}

.onhym-pp-nav {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 0 0 auto;
	background: #fff;
	border: 1px solid #dfeae8;
	border-radius: 999px;
	padding: 2px;
}

.onhym-map-wrap .onhym-pp-nav-btn {
	width: 22px;
	height: 22px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	background-image: none;
	color: var(--onhym-teal-dark);
	cursor: pointer;
	box-shadow: none;
	transition: background .15s, color .15s;
}

.onhym-map-wrap .onhym-pp-nav-btn svg {
	width: 13px;
	height: 13px;
	display: block;
}

.onhym-map-wrap .onhym-pp-nav-btn:hover,
.onhym-map-wrap .onhym-pp-nav-btn:focus,
.onhym-map-wrap .onhym-pp-nav-btn:active {
	background: var(--onhym-teal-dark);
	background-image: none;
	color: #fff;
	outline: none;
}

.onhym-pp-count {
	font-size: 11px;
	font-weight: 700;
	color: var(--onhym-teal-dark);
	font-variant-numeric: tabular-nums;
	padding: 0 3px;
	white-space: nowrap;
}

.onhym-pp-count i {
	font-style: normal;
	font-weight: 600;
	color: var(--onhym-muted);
	margin-left: 3px;
}

.mapboxgl-popup.onhym-pp .mapboxgl-popup-close-button {
	color: #fff;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 7px;
	width: 22px;
	height: 22px;
	font-size: 16px;
	line-height: 1;
	padding: 0;
	right: 9px;
	top: 10px;
	transition: background .15s;
}

.mapboxgl-popup.onhym-pp .mapboxgl-popup-close-button:hover {
	background: rgba(255, 255, 255, 0.36);
	color: #fff;
}

.onhym-pp-body::-webkit-scrollbar {
	width: 7px;
}
.onhym-pp-body::-webkit-scrollbar-thumb {
	background: #cdd8d4;
	border-radius: 8px;
}

/* ===========================================================
   Shared small icon button
   =========================================================== */
.onhym-map-wrap .onhym-icon-btn {
	border: none;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	cursor: pointer;
	width: 24px;
	height: 24px;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0;
	box-shadow: none;
	transition: background .15s;
}

.onhym-map-wrap .onhym-icon-btn svg {
	width: 14px;
	height: 14px;
	display: block;
}

.onhym-map-wrap .onhym-icon-btn:hover,
.onhym-map-wrap .onhym-icon-btn:focus {
	background: rgba(255, 255, 255, 0.4);
	color: #fff;
}

/* ===========================================================
   LEFT — docked layers sidebar
   =========================================================== */
.onhym-sidebar {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 252px;
	max-width: 78%;
	z-index: 4;
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(10px);
	border-right: 1px solid rgba(15, 118, 110, 0.14);
	border-radius: var(--onhym-radius) 0 0 var(--onhym-radius);
	box-shadow: 6px 0 22px rgba(15, 118, 110, 0.12);
	font-size: 12px;
	transition: transform .25s ease;
}

.onhym-sidebar.is-hidden {
	transform: translateX(-104%);
}

.onhym-sidebar-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 12px;
	color: #fff;
	background: linear-gradient(135deg, var(--onhym-teal), var(--onhym-teal-dark));
	border-radius: var(--onhym-radius) 0 0 0;
	flex: 0 0 auto;
}

.onhym-sidebar-ic {
	display: inline-flex;
	opacity: .9;
}

.onhym-sidebar-ic svg {
	width: 15px;
	height: 15px;
	display: block;
}

.onhym-sidebar-title {
	flex: 1 1 auto;
	font-weight: 700;
	font-size: 12.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.onhym-sidebar-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 10px 12px 14px;
}

/* Floating button that brings the sidebar back. */
.onhym-map-wrap .onhym-sidebar-show {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 4;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(15, 118, 110, 0.14);
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(8px);
	color: var(--onhym-teal-dark);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: var(--onhym-shadow);
	padding: 0;
	transition: background .15s, color .15s;
}

.onhym-map-wrap .onhym-sidebar-show.is-visible {
	display: flex;
}

.onhym-map-wrap .onhym-sidebar-show:hover {
	background: var(--onhym-teal-dark);
	color: #fff;
}

.onhym-map-wrap .onhym-sidebar-show svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Keep the bottom-left map widgets clear of the sidebar. */
.onhym-map-wrap.is-sidebar-open .mapboxgl-ctrl-bottom-left {
	margin-left: 252px;
}

/* ===========================================================
   RIGHT — compact map options (click to show / hide)
   =========================================================== */
.onhym-map-wrap .onhym-opt-toggle {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 6;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(15, 118, 110, 0.14);
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(8px);
	color: var(--onhym-teal-dark);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--onhym-shadow);
	padding: 0;
	transition: background .15s, color .15s;
}

.onhym-map-wrap .onhym-opt-toggle svg {
	width: 18px;
	height: 18px;
	display: block;
}

.onhym-map-wrap .onhym-opt-toggle:hover,
.onhym-map-wrap .onhym-opt-toggle.is-active {
	background: linear-gradient(135deg, var(--onhym-teal), var(--onhym-teal-dark));
	border-color: var(--onhym-teal-dark);
	color: #fff;
}

.onhym-opt {
	position: absolute;
	top: 58px;
	right: 12px;
	z-index: 5;
	width: 244px;
	max-width: calc(100% - 24px);
	max-height: calc(100% - 74px);
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(15, 118, 110, 0.12);
	border-radius: 13px;
	box-shadow: var(--onhym-shadow);
	font-size: 12px;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px) scale(.97);
	transform-origin: top right;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.onhym-opt.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.onhym-opt-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 11px;
	font-weight: 700;
	font-size: 12px;
	color: #fff;
	background: linear-gradient(135deg, var(--onhym-teal), var(--onhym-teal-dark));
	flex: 0 0 auto;
}

.onhym-opt-body {
	overflow-y: auto;
	padding: 11px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.onhym-opt-sec-title {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--onhym-muted);
	margin-bottom: 7px;
}

/* ---------- Layers list inside the sidebar ---------- */
.onhym-layers-list {
	display: block;
}

.onhym-layer-group {
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eef2f1;
}

.onhym-layer-group:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.onhym-map-wrap .onhym-layer-head {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 600;
	color: var(--onhym-ink);
	cursor: pointer;
	padding: 2px 0;
	user-select: none;
}

.onhym-map-wrap .onhym-layer-head input[type="checkbox"] {
	accent-color: var(--onhym-teal);
	width: 14px;
	height: 14px;
	min-width: 0;
	margin: 0;
	cursor: pointer;
	flex: 0 0 auto;
}

.onhym-map-wrap .onhym-layer-title {
	line-height: 1.25;
}

.onhym-layer-items {
	padding-left: 21px;
	margin-top: 1px;
}

.onhym-map-wrap .onhym-legend-item {
	display: flex;
	align-items: center;
	margin: 2px 0;
	color: #4b5563;
	font-size: 11px;
}

.onhym-legend-swatch {
	display: inline-block;
	width: 13px;
	height: 13px;
	border-radius: 3px;
	margin-right: 7px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	flex: 0 0 auto;
	object-fit: contain;
}

img.onhym-legend-swatch {
	border: none;
	border-radius: 0;
	background: transparent;
	width: 16px;
	height: 16px;
}

.onhym-map-wrap .onhym-legend-label {
	color: #374151;
	font-size: 11px;
	line-height: 1.25;
}

/* Tools grid */
.onhym-map-wrap .onhym-tools-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
}

.onhym-map-wrap .onhym-tool-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: auto;
	border: 1px solid #e6ecea;
	background: #f8fbfa;
	background-image: none;
	border-radius: 9px;
	padding: 8px 2px;
	cursor: pointer;
	color: #55606b;
	font-size: 9px;
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
	box-shadow: none;
	transition: all .15s;
}

.onhym-map-wrap .onhym-tool-btn svg {
	width: 15px;
	height: 15px;
}

.onhym-map-wrap .onhym-tool-btn:hover {
	border-color: var(--onhym-teal);
	background: #fff;
	color: var(--onhym-teal-dark);
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(15, 118, 110, 0.18);
}

.onhym-opt-body::-webkit-scrollbar,
.onhym-sidebar-body::-webkit-scrollbar {
	width: 8px;
}
.onhym-opt-body::-webkit-scrollbar-thumb,
.onhym-sidebar-body::-webkit-scrollbar-thumb {
	background: #cdd8d4;
	border-radius: 8px;
}

/* ---------- Map control buttons (home / print / basemap) ---------- */
.mapboxgl-ctrl-group.onhym-ctrl {
	border-radius: 10px !important;
	box-shadow: var(--onhym-shadow) !important;
	overflow: visible;
}

.onhym-ctrl-btn {
	width: 32px;
	height: 32px;
	border: none;
	background: #fff;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--onhym-green);
	transition: background .15s, color .15s;
}

.onhym-ctrl-btn:hover {
	background: var(--onhym-sand);
	color: var(--onhym-teal-dark);
}

/* ---------- Control button SVG icons ---------- */
.onhym-ctrl-btn svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* ---------- Style selector (icon-button grid, ArcGIS/Mapbox-like) ---------- */
.onhym-basemap {
	position: relative;
}

.onhym-style-panel {
	display: none;
	position: absolute;
	right: 40px;
	top: -1px;
	background: #fff;
	border-radius: 14px;
	box-shadow: var(--onhym-shadow);
	padding: 14px;
	width: 236px;
	max-width: 78vw;
}

.onhym-style-panel.is-open {
	display: block;
}

.onhym-style-head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .6px;
	color: var(--onhym-teal-dark);
	margin-bottom: 12px;
}

.onhym-style-ic {
	display: inline-flex;
	color: var(--onhym-teal);
}
.onhym-style-ic svg {
	width: 18px;
	height: 18px;
}

.onhym-map-wrap .onhym-style-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}

.onhym-map-wrap .onhym-style-btn {
	aspect-ratio: 1 / 1;
	width: 100%;
	height: auto;
	border: 1px solid #e6ecea;
	background: #f8fbfa;
	background-image: none;
	border-radius: 9px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #55606b;
	box-shadow: none;
	transition: all .15s;
	padding: 0;
}

.onhym-map-wrap .onhym-style-btn svg {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	opacity: 1;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.onhym-map-wrap .onhym-style-btn:hover {
	border-color: var(--onhym-teal);
	background: #fff;
	color: var(--onhym-teal-dark);
	transform: translateY(-1px);
}

.onhym-map-wrap .onhym-style-btn.is-active {
	background: linear-gradient(135deg, var(--onhym-teal), var(--onhym-teal-dark));
	border-color: var(--onhym-teal-dark);
	color: #fff;
	box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

@media (max-width: 680px) {
	.onhym-style-panel {
		width: 200px;
	}
}

/* ---------- Search widget ---------- */
.onhym-search {
	position: absolute;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	width: 280px;
	max-width: calc(100% - 340px);
	transition: left .25s ease;
}

/* Keep the search bar centred on the visible map, not under the sidebar. */
.onhym-map-wrap.is-sidebar-open .onhym-search {
	left: calc(50% + 126px);
}

.onhym-map-wrap .onhym-search-input {
	width: 100%;
	height: 38px;
	min-height: 0;
	margin: 0;
	border: 1px solid rgba(15, 118, 110, 0.18);
	border-radius: 999px;
	padding: 0 16px;
	font-family: inherit;
	font-size: 12.5px;
	line-height: 36px;
	letter-spacing: normal;
	text-transform: none;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: var(--onhym-shadow);
	outline: none;
	color: var(--onhym-ink);
	box-sizing: border-box;
}

.onhym-map-wrap .onhym-search-input:focus {
	border-color: var(--onhym-teal);
}

.onhym-search-results {
	margin-top: 6px;
	background: #fff;
	border-radius: 10px;
	box-shadow: var(--onhym-shadow);
	max-height: 260px;
	overflow-y: auto;
	display: none;
}

.onhym-search-results.is-open {
	display: block;
}

.onhym-search-item {
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	border-bottom: 1px solid #f0f4f3;
	color: var(--onhym-ink);
}

.onhym-search-item:hover {
	background: var(--onhym-sand);
}

.onhym-search-item small {
	color: var(--onhym-muted);
	display: block;
	font-size: 11px;
}

/* ---------- Coordinate readout ---------- */
.onhym-coords {
	background: rgba(255, 255, 255, 0.9);
	padding: 4px 10px;
	font-size: 11px;
	color: var(--onhym-ink);
	border-radius: 999px;
	font-variant-numeric: tabular-nums;
	min-width: 130px;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* ---------- Measure tool ---------- */
.onhym-measure {
	position: relative;
}

.onhym-measure-menu {
	display: none;
	position: absolute;
	right: 40px;
	top: -1px;
	background: #fff;
	border-radius: 10px;
	box-shadow: var(--onhym-shadow);
	overflow: hidden;
	min-width: 130px;
	padding: 6px;
}

.onhym-measure-menu.is-open {
	display: block;
}

.onhym-measure-item {
	display: block;
	width: 100%;
	text-align: left;
	border: none;
	background: #fff;
	padding: 8px 12px;
	font-size: 13px;
	cursor: pointer;
	color: var(--onhym-ink);
	border-radius: 7px;
	transition: background .12s;
}

.onhym-measure-item:hover {
	background: var(--onhym-sand);
	color: var(--onhym-teal-dark);
}

.onhym-measure-readout {
	display: none;
	position: absolute;
	bottom: 34px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--onhym-teal-dark);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 999px;
	box-shadow: var(--onhym-shadow);
	z-index: 5;
	white-space: nowrap;
}

.onhym-measure-readout.is-visible {
	display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
	/* The sidebar overlays the map instead of shrinking it. */
	.onhym-map-wrap .onhym-sidebar {
		width: min(84%, 280px);
		max-width: none;
		z-index: 7;
		border-radius: var(--onhym-radius) 0 0 var(--onhym-radius);
	}

	.onhym-map-wrap.is-sidebar-open .mapboxgl-ctrl-bottom-left {
		margin-left: 0;
	}

	/* Bigger tap targets. */
	.onhym-map-wrap .onhym-sidebar-show,
	.onhym-map-wrap .onhym-opt-toggle {
		width: 40px;
		height: 40px;
	}

	.onhym-map-wrap .onhym-icon-btn {
		width: 30px;
		height: 30px;
	}

	.onhym-map-wrap .onhym-icon-btn svg {
		width: 16px;
		height: 16px;
	}

	/* Options panel spans the width, minus the two floating buttons. */
	.onhym-map-wrap .onhym-opt {
		top: 60px;
		left: 10px;
		right: 10px;
		width: auto;
		max-width: none;
		max-height: calc(100% - 76px);
	}

	/* When the sidebar overlays the map, hide the options toggle and force-close
	   the options panel — there is no room for both simultaneously on mobile. */
	.onhym-map-wrap.is-sidebar-open .onhym-opt-toggle {
		display: none;
	}
	.onhym-map-wrap.is-sidebar-open .onhym-opt {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		transform: translateY(-8px) scale(.97) !important;
	}

	.onhym-map-wrap .onhym-tools-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.onhym-map-wrap .onhym-tool-btn {
		font-size: 9.5px;
		padding: 10px 2px;
	}

	/* Search sits on the top row, between the two round buttons. */
	.onhym-search,
	.onhym-map-wrap.is-sidebar-open .onhym-search {
		top: 12px;
		bottom: auto;
		left: 60px;
		right: 60px;
		width: auto;
		max-width: none;
		transform: none;
	}

	.onhym-search-results {
		max-height: 200px;
	}

	/* 16px avoids the iOS zoom-on-focus. */
	.onhym-map-wrap .onhym-search-input {
		height: 40px;
		font-size: 16px;
		line-height: 38px;
	}

	.onhym-measure-readout {
		font-size: 12px;
		padding: 6px 12px;
	}

	.mapboxgl-popup.onhym-pp {
		max-width: calc(100vw - 48px) !important;
	}

	.onhym-pp-card {
		width: auto;
		min-width: 220px;
	}

	.onhym-pp-body {
		max-height: 190px;
	}

	.onhym-map-title {
		font-size: 12px;
		max-width: 60%;
	}
}

@media (max-width: 480px) {
	/* Coordinates take too much room next to the scale bar. */
	.onhym-coords {
		display: none;
	}

	.onhym-map-wrap .onhym-style-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
