/* ==========================================================================
   GoKumuh Kota Bekasi — WebGIS (full-screen map)
   Builds on the tokens in gokumuh.css. Every component is prefixed .gm-
   ========================================================================== */

body.gk-webgis {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
}

.gm {
	--gm-gap: 16px;
	--gm-left-w: 344px;
	--gm-right-w: 404px;
	--gm-glass: rgba(255, 255, 255, .9);

	position: fixed;
	inset: 0;
	font-size: 14.5px;
}

.gm button {
	font-family: var(--gk-font);
}

.gm svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gm-map {
	position: absolute;
	inset: 0;
	background: #e9ece9;
}

.gm .leaflet-container {
	font-family: var(--gk-font);
	background: #e9ece9;
}

.gm .leaflet-control-attribution {
	padding: 2px 8px;
	border-radius: 8px 0 0 0;
	background: rgba(255, 255, 255, .82) !important;
	font-size: 11px;
}

.gm .leaflet-control-scale {
	margin: 0 0 var(--gm-gap) var(--gm-gap) !important;
}

.gm .leaflet-control-scale-line {
	border-color: var(--gk-ink-2);
	background: rgba(255, 255, 255, .85);
	color: var(--gk-ink);
	font-size: 11px;
}

/* shared surfaces */

.gm-panel,
.gm-searchbar,
.gm-chip,
.gm-basemaps,
.gm-zoom,
.gm-legend,
.gm-toast,
.gm-loading {
	border: 1px solid rgba(255, 255, 255, .7);
	background: var(--gm-glass);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, var(--gk-shadow-md);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.gm-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--gk-ink-2);
	cursor: pointer;
	transition: background-color .15s var(--gk-ease);
}

.gm-icon-btn:hover {
	background: rgba(19, 32, 44, .06);
	color: var(--gk-ink);
}

.gm-icon-btn svg {
	width: 20px;
	height: 20px;
}

/* loading */

.gm-loading {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 1200;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	border-radius: 14px;
	color: var(--gk-ink);
	font-weight: 600;
	transform: translate(-50%, -50%);
}

.gm-loading[hidden] {
	display: none;
}

.gm-spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid var(--gk-teal-100);
	border-top-color: var(--gk-teal-700);
	border-radius: 50%;
	animation: gm-spin .8s linear infinite;
}

@keyframes gm-spin {
	to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Top: search + chips
   -------------------------------------------------------------------------- */

.gm-top {
	position: absolute;
	top: var(--gm-gap);
	left: var(--gm-gap);
	z-index: 1100;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(620px, calc(100% - var(--gm-gap) * 2));
}

.gm-searchbar {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px;
	border-radius: 16px;
}

.gm-home {
	display: inline-flex;
	flex-shrink: 0;
	border-radius: 11px;
}

.gm-home svg {
	width: 40px;
	height: 40px;
	stroke: none;
}

.gm-search {
	position: relative;
	flex: 1;
	min-width: 0;
}

.gm-search__icon {
	position: absolute;
	left: 12px;
	top: 50%;
	width: 18px;
	height: 18px;
	color: var(--gk-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.gm-search input {
	width: 100%;
	height: 44px;
	padding: 0 40px 0 38px;
	border: 1px solid transparent;
	border-radius: 11px;
	background: transparent;
	color: var(--gk-ink);
	font: 500 15px var(--gk-font);
	outline: none;
}

.gm-search input::placeholder {
	color: var(--gk-muted);
}

.gm-search input:focus {
	border-color: var(--gk-teal-500);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(26, 156, 134, .18);
}

.gm-search input::-webkit-search-cancel-button {
	display: none;
}

.gm-search__clear {
	position: absolute;
	right: 4px;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--gk-muted);
	transform: translateY(-50%);
	cursor: pointer;
}

.gm-search__clear[hidden] {
	display: none;
}

.gm-search__clear svg {
	width: 16px;
	height: 16px;
}

.gm-search__results {
	position: absolute;
	top: calc(100% + 12px);
	left: -52px;
	right: -6px;
	max-height: min(420px, 60vh);
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	border: 1px solid var(--gk-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--gk-shadow-lg);
	list-style: none;
}

.gm-search__results[hidden] {
	display: none;
}

.gm-result {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
}

.gm-result[aria-selected="true"],
.gm-result:hover {
	background: var(--gk-teal-50);
}

.gm-result__type {
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--gk-surface-2);
	color: var(--gk-ink-2);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .02em;
}

.gm-result__name {
	overflow: hidden;
	color: var(--gk-ink);
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gm-result__name mark {
	padding: 0;
	background: none;
	color: var(--gk-teal-700);
}

.gm-result__meta {
	color: var(--gk-muted);
	font-size: 12.5px;
	white-space: nowrap;
}

.gm-result--empty {
	color: var(--gk-muted);
	cursor: default;
}

.gm-filter-toggle {
	display: none;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--gk-line);
	border-radius: 11px;
	background: #fff;
	color: var(--gk-ink);
	font-weight: 600;
	cursor: pointer;
}

.gm-filter-toggle svg {
	width: 18px;
	height: 18px;
}

.gm-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 2px;
}

.gm-chips::-webkit-scrollbar {
	display: none;
}

.gm-chip {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 7px;
	min-height: 36px;
	padding: 0 14px;
	border-radius: 999px;
	color: var(--gk-ink-2);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s var(--gk-ease), color .15s var(--gk-ease), border-color .15s var(--gk-ease);
}

.gm-chip i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.gm-chip:hover {
	color: var(--gk-ink);
}

.gm-chip[aria-checked="true"] {
	border-color: var(--gk-slate-900);
	background: var(--gk-slate-900);
	color: #fff;
}

/* --------------------------------------------------------------------------
   Panels (drawers)
   -------------------------------------------------------------------------- */

.gm-panel {
	position: absolute;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	overflow: hidden;
	transition: transform .32s var(--gk-ease), opacity .25s var(--gk-ease);
}

.gm-panel--left {
	top: 134px;
	left: var(--gm-gap);
	bottom: var(--gm-gap);
	width: var(--gm-left-w);
}

.gm-panel--left.is-collapsed {
	transform: translateX(calc(-100% - var(--gm-gap) * 2));
	opacity: 0;
	pointer-events: none;
}

.gm-panel--right {
	top: var(--gm-gap);
	right: var(--gm-gap);
	bottom: var(--gm-gap);
	width: var(--gm-right-w);
	background: rgba(255, 255, 255, .96);
	animation: gm-slide-in .32s var(--gk-ease);
}

.gm-panel--right[hidden] {
	display: none;
}

@keyframes gm-slide-in {
	from { transform: translateX(24px); opacity: 0; }
}

.gm-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 16px 10px 24px;
}

.gm-panel__title {
	font-size: 17px !important;
	font-weight: 800;
}

.gm-panel__body {
	flex: 1;
	min-height: 0;
	padding: 6px 24px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.gm-group {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.gm-group__title {
	float: none;
	width: auto;
	margin: 0 0 10px;
	padding: 0;
	color: var(--gk-muted);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}

/* switches */

.gm-switch {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	margin: 0;
	padding: 9px 10px;
	border-radius: 12px;
	cursor: pointer;
}

.gm-switch:hover {
	background: rgba(19, 32, 44, .04);
}

.gm-switch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.gm-switch__track {
	position: relative;
	width: 36px;
	height: 22px;
	border-radius: 999px;
	background: var(--gk-line-strong);
	transition: background-color .2s var(--gk-ease);
}

.gm-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(19, 32, 44, .3);
	transition: transform .2s var(--gk-ease);
}

.gm-switch input:checked + .gm-switch__track {
	background: var(--gk-teal-600);
}

.gm-switch input:checked + .gm-switch__track::after {
	transform: translateX(14px);
}

.gm-switch input:focus-visible + .gm-switch__track {
	outline: 3px solid var(--gk-amber-400);
	outline-offset: 2px;
}

.gm-switch__text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.gm-switch__text strong {
	color: var(--gk-ink);
	font-size: 14px;
	font-weight: 600;
}

.gm-switch__text small {
	color: var(--gk-muted);
	font-size: 12.5px;
}

.gm-switch.is-disabled {
	cursor: not-allowed;
}

.gm-switch.is-disabled strong {
	color: var(--gk-muted);
}

/* segmented control */

.gm-segment {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	border-radius: 12px;
	background: var(--gk-surface-2);
}

.gm-segment button {
	min-height: 36px;
	padding: 0 8px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--gk-ink-2);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.gm-segment button[aria-checked="true"] {
	background: #fff;
	color: var(--gk-ink);
	box-shadow: var(--gk-shadow-sm);
}

/* legend filter (swatch toggles) */

.gm-legend-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 10px;
}

.gm-swatch {
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	min-height: 40px;
	margin: 0;
	padding: 0 10px;
	border-radius: 10px;
	color: var(--gk-ink);
	font-size: 14px;
	cursor: pointer;
}

.gm-swatch:hover {
	background: rgba(19, 32, 44, .04);
}

.gm-swatch input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--gk-teal-700);
	cursor: pointer;
}

.gm-swatch__color {
	width: 16px;
	height: 16px;
	border-radius: 5px;
	box-shadow: inset 0 0 0 1px rgba(19, 32, 44, .12);
}

.gm-swatch__label small {
	display: block;
	color: var(--gk-muted);
	font-size: 12px;
}

.gm-swatch__count {
	color: var(--gk-muted);
	font-size: 12.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.gm-note {
	margin-top: 8px !important;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--gk-amber-50);
	color: var(--gk-amber-800);
	font-size: 12.5px;
	line-height: 1.5;
}

.gm-note:empty {
	display: none;
}

/* year slider */

.gm-range input {
	width: 100%;
	height: 28px;
	margin: 0;
	accent-color: var(--gk-teal-700);
	cursor: pointer;
}

.gm-range__ticks {
	display: flex;
	justify-content: space-between;
	padding: 0 2px;
	color: var(--gk-ink-2);
	font-size: 12.5px;
	font-weight: 600;
}

.gm-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0 0 18px;
}

.gm-stats div {
	padding: 12px 14px;
	border: 1px solid var(--gk-line);
	border-radius: 12px;
	background: #fff;
}

.gm-stats dt {
	color: var(--gk-muted);
	font-size: 12px;
	font-weight: 600;
}

.gm-stats dd {
	margin: 2px 0 0;
	font-family: var(--gk-font-display);
	font-size: 20px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.gm-classic {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border: 1px dashed var(--gk-line-strong);
	border-radius: 12px;
	color: var(--gk-ink-2) !important;
	font-size: 13px;
	font-weight: 600;
}

.gm-classic:hover {
	border-color: var(--gk-teal-500);
	color: var(--gk-teal-700) !important;
}

.gm-classic svg {
	width: 16px;
	height: 16px;
}

/* --------------------------------------------------------------------------
   Detail drawer
   -------------------------------------------------------------------------- */

.gm-detail__head {
	align-items: flex-start;
	padding-top: 22px;
}

.gm-detail__kicker {
	color: var(--gk-muted);
	font-size: 12.5px;
	font-weight: 600;
}

.gm-detail__title {
	margin-top: 2px !important;
	font-size: 22px !important;
	font-weight: 800;
	line-height: 1.2;
	outline: none;
}

/* focused programmatically so screen readers announce the profile */
.gm-detail__title:focus,
.gm-detail__title:focus-visible {
	outline: none;
}

.gm-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.gm-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 11px;
	border-radius: 999px;
	background: var(--gk-surface-2);
	color: var(--gk-ink);
	font-size: 12.5px;
	font-weight: 700;
}

.gm-badge i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.gm-score {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	margin-bottom: 18px;
	padding: 16px;
	border: 1px solid var(--gk-line);
	border-radius: 16px;
	background: linear-gradient(180deg, #fff, #fbfaf7);
}

.gm-score__ring {
	position: relative;
	width: 76px;
	height: 76px;
}

.gm-score__ring svg {
	width: 76px;
	height: 76px;
	transform: rotate(-90deg);
}

.gm-score__ring circle {
	fill: none;
	stroke-width: 8;
}

.gm-score__value {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-family: var(--gk-font-display);
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
}

.gm-score__value small {
	margin-top: 2px;
	color: var(--gk-muted);
	font-family: var(--gk-font);
	font-size: 10.5px;
	font-weight: 600;
}

.gm-score__text strong {
	display: block;
	font-size: 15px;
}

.gm-score__text span {
	color: var(--gk-ink-2);
	font-size: 12.5px;
	line-height: 1.45;
}

.gm-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 0 0 22px;
}

.gm-facts div {
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--gk-surface-2);
}

.gm-facts dt {
	color: var(--gk-muted);
	font-size: 12px;
	font-weight: 600;
}

.gm-facts dd {
	margin: 2px 0 0;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.gm-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 12px !important;
	font-family: var(--gk-font) !important;
	font-size: 12px !important;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--gk-muted) !important;
}

.gm-radar {
	display: block;
	width: 100%;
	max-width: 300px;
	height: auto;
	margin: 0 auto 8px;
	overflow: visible;
}

.gm-radar text {
	fill: var(--gk-ink-2);
	stroke: none;
	font: 600 10.5px var(--gk-font);
}

.gm-bars {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.gm-bar__row {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 5px;
	font-size: 13px;
}

.gm-bar__row strong {
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

.gm-bar__track {
	height: 8px;
	border-radius: 999px;
	background: var(--gk-surface-2);
	overflow: hidden;
}

.gm-bar__fill {
	height: 100%;
	width: var(--v);
	border-radius: inherit;
	background: var(--c);
	transform-origin: left;
	animation: gk-grow .8s var(--gk-ease) both;
}

.gm-photo {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 22px;
	border: 1px dashed var(--gk-line-strong);
	border-radius: 14px;
	overflow: hidden;
	background: repeating-linear-gradient(-45deg, #f4f2ed 0 10px, #efece6 10px 20px);
}

.gm-photo span {
	display: flex;
	align-items: flex-end;
	min-height: 112px;
	padding: 10px 12px;
	color: var(--gk-ink-2);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.gm-photo span + span {
	border-left: 2px solid #fff;
}

.gm-photo p {
	position: absolute;
	left: 50%;
	top: 42%;
	width: 80%;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .92);
	color: var(--gk-ink-2);
	font-size: 12.5px;
	text-align: center;
	transform: translate(-50%, -50%);
}

.gm-needs {
	display: flex;
	flex-direction: column;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.gm-needs li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--gk-line);
	font-size: 13.5px;
}

.gm-needs li:last-child {
	border-bottom: 0;
}

.gm-needs strong {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.gm-muted {
	color: var(--gk-muted);
	font-size: 13px;
	line-height: 1.5;
}

.gm-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
}

.gm-actions .gk-btn {
	width: 100%;
}

.gm-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.gm-shape {
	display: block;
	width: 100%;
	height: 120px;
	margin-bottom: 16px;
	border-radius: 14px;
	background:
		linear-gradient(rgba(44, 69, 96, .06) 1px, transparent 1px) 0 0 / 16px 16px,
		linear-gradient(90deg, rgba(44, 69, 96, .06) 1px, transparent 1px) 0 0 / 16px 16px,
		#f4f6f4;
}

.gm-shape path {
	stroke: #fff;
	stroke-width: 1.5;
}

.gm-rt {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 22px;
}

.gm-rt span {
	padding: 4px 9px;
	border: 1px solid var(--gk-line);
	border-radius: 8px;
	background: #fff;
	font-size: 12.5px;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Controls & legend
   -------------------------------------------------------------------------- */

.gm-controls {
	position: absolute;
	right: var(--gm-gap);
	bottom: 36px;
	z-index: 1000;
	display: flex;
	align-items: flex-end;
	gap: 10px;
	transition: right .32s var(--gk-ease);
}

.gm.is-detail-open .gm-controls {
	right: calc(var(--gm-right-w) + var(--gm-gap) * 2);
}

.gm-basemaps {
	display: flex;
	gap: 4px;
	padding: 5px;
	border-radius: 14px;
}

.gm-basemaps button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 62px;
	padding: 4px 4px 6px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--gk-ink-2);
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
}

.gm-basemaps button[aria-checked="true"] {
	background: #fff;
	color: var(--gk-ink);
	box-shadow: var(--gk-shadow-sm);
}

.gm-basemaps__thumb {
	width: 52px;
	height: 36px;
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px rgba(19, 32, 44, .12);
}

.gm-basemaps__thumb.is-light {
	background:
		linear-gradient(115deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%),
		linear-gradient(20deg, transparent 60%, #fff 60%, #fff 66%, transparent 66%),
		#e3e5e1;
}

.gm-basemaps__thumb.is-satellite {
	background:
		radial-gradient(circle at 30% 30%, #6d7f57 0 18%, transparent 19%),
		radial-gradient(circle at 70% 60%, #8b8a77 0 22%, transparent 23%),
		linear-gradient(115deg, transparent 46%, #c9c3b2 46%, #c9c3b2 52%, transparent 52%),
		#4f5f45;
}

.gm-basemaps__thumb.is-dark {
	background:
		linear-gradient(115deg, transparent 46%, #4d5257 46%, #4d5257 54%, transparent 54%),
		linear-gradient(20deg, transparent 60%, #4d5257 60%, #4d5257 66%, transparent 66%),
		#2b2e31;
}

.gm-zoom {
	display: flex;
	flex-direction: column;
	padding: 4px;
	border-radius: 14px;
}

.gm-zoom button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--gk-ink);
	cursor: pointer;
}

.gm-zoom button:hover {
	background: rgba(19, 32, 44, .06);
}

.gm-zoom button + button {
	border-top: 1px solid var(--gk-line);
	border-radius: 0 0 10px 10px;
}

.gm-zoom svg {
	width: 18px;
	height: 18px;
}

.gm-zoom [data-gm-locate].is-active {
	color: var(--gk-teal-700);
}

.gm-legend {
	position: absolute;
	left: calc(var(--gm-left-w) + var(--gm-gap) * 2);
	bottom: 36px;
	z-index: 900;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	max-width: calc(100% - var(--gm-left-w) - 420px);
	padding: 9px 14px;
	border-radius: 12px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--gk-ink-2);
	transition: left .32s var(--gk-ease);
}

.gm.is-panel-collapsed .gm-legend {
	left: var(--gm-gap);
}

/* the open profile needs the room; the left panel still shows the key */
.gm.is-detail-open .gm-legend {
	display: none;
}

.gm-legend strong {
	color: var(--gk-ink);
}

.gm-legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.gm-legend i {
	width: 12px;
	height: 12px;
	border-radius: 4px;
}

.gm-legend i.is-line {
	height: 4px;
	border-radius: 2px;
}

.gm-legend i.is-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.gm-toast {
	position: absolute;
	left: 50%;
	bottom: 96px;
	z-index: 1300;
	max-width: min(440px, calc(100% - 32px));
	padding: 10px 16px;
	border-radius: 12px;
	color: var(--gk-ink);
	font-size: 13.5px;
	font-weight: 600;
	transform: translateX(-50%);
}

.gm-toast[hidden] {
	display: none;
}

/* leaflet tooltip */

.gm .leaflet-tooltip.gm-tip {
	padding: 9px 12px;
	border: 1px solid var(--gk-line);
	border-radius: 12px;
	box-shadow: var(--gk-shadow-md);
	color: var(--gk-ink);
	font-size: 12.5px;
	line-height: 1.45;
}

.gm .leaflet-tooltip.gm-tip::before {
	display: none;
}

.gm-tip strong {
	display: block;
	font-size: 13.5px;
}

.gm-tip span {
	color: var(--gk-ink-2);
}

.gm-locate-dot {
	width: 18px;
	height: 18px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #2a7de1;
	box-shadow: 0 0 0 6px rgba(42, 125, 225, .25);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
	.gm {
		--gm-right-w: 360px;
		--gm-left-w: 316px;
	}

	.gm-legend {
		display: none;
	}
}

@media (max-width: 860px) {
	.gm {
		--gm-gap: 12px;
	}

	.gm-top {
		width: calc(100% - var(--gm-gap) * 2);
	}

	.gm-filter-toggle {
		display: inline-flex;
	}

	.gm-search__results {
		right: -56px;
	}

	.gm-filter-toggle {
		width: 44px;
		padding: 0;
		justify-content: center;
	}

	.gm-filter-toggle span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	/* drawers become bottom sheets */
	.gm-panel--left,
	.gm-panel--right {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-height: 72vh;
		max-height: 72dvh;
		border-radius: 20px 20px 0 0;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.gm-panel--left {
		z-index: 1150;
	}

	.gm-panel--left.is-collapsed {
		transform: translateY(105%);
	}

	.gm-panel--right {
		z-index: 1160;
		animation-name: gm-sheet-in;
	}

	.gm-panel__head::before {
		content: "";
		position: absolute;
		top: 8px;
		left: 50%;
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: var(--gk-line-strong);
		transform: translateX(-50%);
	}

	.gm-panel__head {
		position: relative;
		padding: 22px 12px 8px 20px;
	}

	.gm-panel__body {
		padding: 4px 20px 20px;
	}

	.gm-controls {
		bottom: 28px;
		flex-direction: column;
		align-items: flex-end;
	}

	.gm.is-detail-open .gm-controls {
		right: var(--gm-gap);
	}

	.gm-toast {
		top: 116px;
		bottom: auto;
	}

	.gm-basemaps {
		flex-direction: column;
		padding: 4px;
	}

	.gm-basemaps button {
		width: 48px;
		padding: 4px;
		font-size: 0;
		gap: 0;
	}

	.gm-basemaps__thumb {
		width: 36px;
		height: 26px;
	}
}

@media (max-width: 480px) {
	.gm-search input {
		font-size: 14px;
	}
}

@keyframes gm-sheet-in {
	from { transform: translateY(40px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Print: "Unduh Profil Kawasan (PDF)" prints the profile only
   -------------------------------------------------------------------------- */

@media print {
	@page {
		margin: 16mm;
	}

	body.gk-webgis {
		height: auto;
		overflow: visible;
		background: #fff !important;
	}

	.gm {
		position: static;
	}

	.gm-map,
	.gm-top,
	.gm-panel--left,
	.gm-controls,
	.gm-legend,
	.gm-loading,
	.gm-toast,
	.gk-skip,
	.gm-actions,
	.gm-icon-btn {
		display: none !important;
	}

	.gm-panel--right {
		position: static;
		width: auto;
		max-height: none;
		border: 0;
		box-shadow: none;
		backdrop-filter: none;
		animation: none;
	}

	.gm-panel__body {
		overflow: visible;
		padding: 0;
	}

	.gm-panel__head {
		padding: 0 0 12px;
	}

	.gm-print-footer {
		display: block !important;
		margin-top: 16px;
		color: #555;
		font-size: 11px;
	}

	.gm-bar__fill {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

.gm-print-footer {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.gm *,
	.gm *::before,
	.gm *::after {
		animation: none !important;
		transition: none !important;
	}
}
