/* Compact map tools: one task, two fields, one primary action. */
.map-layers-control { position:absolute; display:flex; align-items:center; gap:8px; left:var(--map-overlay-edge,16px); top:var(--map-tools-top,12px); z-index:45; }
.map-house-filters-toggle { display:inline-flex; align-items:center; justify-content:center; height:44px; min-width:96px; padding:0 14px; border:1px solid var(--line); border-radius:12px; background:var(--ui-surface,#fff); color:var(--ui-text,#1d1d1f); box-shadow:0 3px 14px #0000000d; font-size:14px; font-weight:550; cursor:pointer; }
.map-house-filters-toggle:hover { background:var(--ui-hover,#f0f0f3); }
.map-house-filters-toggle[aria-expanded="true"] { color:var(--ui-selected-text,#005bb5); background:var(--ui-selected,#e8f2ff); }
.map-house-filters-toggle:focus-visible { outline:2px solid var(--ui-focus,#0071e3); outline-offset:3px; }
.map-layers-toggle { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; min-width:44px; padding:0 12px; border:1px solid var(--line); border-radius:12px; background:var(--ui-surface,#fff); color:var(--ui-text,#1d1d1f); box-shadow:0 3px 14px #0000000d; cursor:pointer; }
.map-layers-toggle svg { width:22px; height:22px; flex:0 0 22px; }
.map-layers-toggle span { white-space:nowrap; font-size:14px; font-weight:550; }
.map-layers-toggle:hover { background:var(--ui-hover,#f0f0f3); }
.map-layers-toggle.has-active-layers { color:var(--ui-selected-text,#005bb5); background:var(--ui-selected,#e8f2ff); }
.map-layers-toggle:focus-visible,.map-layers-panel :is(button,input,select,summary):focus-visible { outline:2px solid var(--ui-focus,#0071e3); outline-offset:3px; }
.map-layers-panel { position:absolute; left:0; top:56px; width:min(var(--map-card-width,340px),calc(100vw - 2 * var(--map-overlay-edge,16px))); max-height:calc(100dvh - var(--app-header-height,76px) - 84px); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:var(--ui-surface,#fff); color:var(--ui-text,#1d1d1f); box-shadow:0 12px 36px #0000001a; }
.map-layers-panel[hidden] { display:none; }
.map-layers-heading { display:flex; align-items:center; flex:0 0 auto; gap:4px; padding:6px 8px 4px 16px; }
.map-layers-heading h2 { flex:1; margin:0; font-size:17px; line-height:1.25; font-weight:600; letter-spacing:-.02em; }
.map-layers-heading h2:focus { outline:none; }
.map-layers-heading .icon-button { width:44px; height:44px; min-width:44px; min-height:44px; padding:0; border:0; background:transparent; color:var(--muted); font-size:25px; }
.map-layers-heading .map-layers-help-button { font-size:16px; font-weight:500; }
.map-layers-heading .icon-button:hover { background:var(--ui-hover,#f0f0f3); color:var(--ui-text,#1d1d1f); }
.map-layers-sections { display:flex; gap:2px; flex:0 0 auto; margin:0 12px 4px; padding:3px; border-radius:11px; background:var(--ui-field,#f5f5f7); }
.map-layers-sections button { flex:1; min-width:0; min-height:40px; padding:7px 5px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:13px; line-height:1.2; white-space:nowrap; cursor:pointer; }
.map-layers-sections button[aria-pressed="true"] { background:var(--ui-surface,#fff); color:var(--ui-text,#1d1d1f); box-shadow:0 1px 4px #00000012; font-weight:600; }
.map-layers-sections:has([data-layers-find-entry]) [data-layers-section="environment"] { flex:1.5; }
.map-layers-content { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:8px 12px 12px; }
.map-layers-search { margin:0; padding:0; }
.map-layers-house-heading { margin:0 0 8px; font-size:14px; font-weight:600; }
.map-layers-house-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.map-layers-house-actions>button { flex:1; min-height:44px; padding:6px 8px; font:inherit; font-size:13px; white-space:nowrap; }
.map-layers-fields { overflow:hidden; border-radius:12px; background:var(--ui-field,#f5f5f7); }
.map-layers-fields:empty { display:none; }
.map-layers-fields>*+* { border-top:1px solid var(--line); }
.map-layers-field { display:grid; grid-template-columns:minmax(0,1fr) 100px; align-items:center; gap:8px; min-height:48px; margin:0; padding:2px 12px; font-size:13px; font-weight:500; }
.map-layers-field :is(input,select) { display:block; width:100%; min-width:0; min-height:44px; padding:8px 0 8px 6px; margin:0; border:0; border-radius:6px; background:transparent; color:var(--ui-text,#1d1d1f); text-align:right; font-size:16px; font-weight:400; }
.map-layers-field input::placeholder { color:var(--muted); opacity:1; }
.map-layers-field :is(input,select):disabled { color:var(--muted); opacity:.6; }
.map-layers-search>.primary { width:100%; min-height:44px; margin-top:12px; border-radius:11px; font-size:15px; }
.map-layers-house-primary { margin:0 0 8px; }
.map-layers-house-primary>button { width:100%; min-height:44px; border-radius:11px; font-size:15px; }
.map-layers-house-conditions>summary { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 4px; list-style:none; font-size:14px; font-weight:500; cursor:pointer; }
.map-layers-house-conditions>summary::-webkit-details-marker { display:none; }
.map-layers-house-conditions>summary::marker { content:''; }
.map-layers-house-conditions-count { flex:1; min-width:0; text-align:right; color:var(--muted); font-size:13px; font-weight:400; }
.map-layers-house-conditions-count[hidden] { display:none; }
.map-layers-house-conditions>summary>.map-layers-chevron { margin-left:auto; }
.map-layers-house-conditions[open]>summary>.map-layers-chevron { margin-top:4px; transform:rotate(225deg); }
.map-layers-house-conditions-content { padding-top:4px; }
.map-layers-developer-picker { min-width:0; }
.map-layers-developer-picker>summary { display:flex; align-items:center; gap:8px; min-height:48px; padding:6px 12px; list-style:none; font-size:13px; font-weight:500; cursor:pointer; }
.map-layers-developer-picker>summary::-webkit-details-marker { display:none; }
.map-layers-developer-picker>summary::marker { content:''; }
.map-layers-developer-value { flex:1; min-width:0; text-align:right; overflow-wrap:anywhere; color:var(--muted); font-size:14px; font-weight:400; }
.map-layers-developer-picker:has(input:checked) .map-layers-developer-value { color:var(--ui-text,#1d1d1f); }
.map-layers-chevron { width:6px; height:6px; margin:0 2px 3px 1px; border-right:1.5px solid var(--muted); border-bottom:1.5px solid var(--muted); transform:rotate(45deg); }
.map-layers-developer-picker[open] .map-layers-chevron { margin-top:4px; transform:rotate(225deg); }
.map-layers-developer-menu { padding:0 8px 8px; }
.map-layers-developer-search { display:block; padding:0 4px 4px; }
.map-layers-developer-search input { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--ui-surface,#fff); color:var(--ui-text,#1d1d1f); font-size:16px; }
.map-layers-panel .map-layers-developers { min-width:0; max-height:176px; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable; padding:0 20px 0 4px; margin:0; border:0; }
.map-layers-developers label { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; font-size:14px; font-weight:400; cursor:pointer; }
.map-layers-developers label+label { border-top:1px solid var(--line); }
.map-layers-developers label>span { min-width:0; overflow-wrap:anywhere; }
.map-layers-developers input { width:20px; height:20px; flex:0 0 20px; margin:0; accent-color:var(--blue); }
.map-layers-developer-menu>.text-button { min-height:44px; width:100%; padding:6px 4px; text-align:left; font-size:13px; }
.map-layers-type-picker { min-width:0; }
.map-layers-type-picker>summary { display:flex; align-items:center; gap:8px; min-height:48px; padding:6px 12px; list-style:none; font-size:13px; font-weight:500; cursor:pointer; }
.map-layers-type-picker>summary::-webkit-details-marker { display:none; }
.map-layers-type-picker>summary::marker { content:''; }
.map-layers-type-value { flex:1; min-width:0; text-align:right; overflow-wrap:anywhere; color:var(--muted); font-size:14px; font-weight:400; }
.map-layers-type-picker:has(input:checked) .map-layers-type-value { color:var(--ui-text,#1d1d1f); }
.map-layers-type-picker[open] .map-layers-chevron { margin-top:4px; transform:rotate(225deg); }
.map-layers-panel .map-layers-house-types { min-width:0; padding:0 12px; margin:0; border:0; }
.map-layers-house-types label { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; font-size:14px; font-weight:400; cursor:pointer; }
.map-layers-house-types label+label { border-top:1px solid var(--line); }
.map-layers-house-types label>span { min-width:0; overflow-wrap:anywhere; }
.map-layers-house-types input { width:20px; height:20px; flex:0 0 20px; margin:0; accent-color:var(--blue); }
.map-layers-type-picker>.text-button { min-height:44px; width:100%; padding:6px 12px; text-align:left; font-size:13px; }
.map-layers-note { margin:10px 4px 0; font-size:13px; line-height:1.45; color:var(--muted); }
.map-layers-search>[role="alert"] { color:var(--ui-text,#1d1d1f); }
.map-layers-panel .map-layers-environment { min-width:0; margin:0; padding:0; border:0; }
.map-layers-option { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:48px; padding:6px 4px; font-size:14px; cursor:pointer; }
.map-layers-option+.map-layers-option { border-top:1px solid var(--line); }
.map-layers-option input { flex:0 0 36px; width:36px; height:22px; margin:0; appearance:none; border:0; border-radius:20px; background:#8e8e93; cursor:pointer; position:relative; }
.map-layers-option input::before { content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #00000020; }
.map-layers-option input:checked { background:var(--blue); }
.map-layers-option input:checked::before { transform:translateX(14px); }
.map-layers-source-caption { margin:8px 4px 2px; color:var(--muted); font-size:12px; line-height:1.4; }
.map-layers-context-address { margin:2px 4px 10px; color:var(--muted); font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.map-layers-status { flex:0 0 auto; margin:0; padding:0 16px 12px; color:var(--muted); font-size:13px; line-height:1.4; }
.map-layers-footer { flex:0 0 auto; padding:0 12px 8px; }
.map-layers-footer>button { width:100%; min-height:44px; padding:6px; text-align:center; font:inherit; font-size:13px; color:var(--muted); }
.map-layers-footer>button:hover { color:var(--ui-text,#1d1d1f); }
@media(max-width:600px) {
 .map-layers-control { left:var(--map-overlay-edge,12px); }
 .map-layers-panel { position:fixed; left:12px; right:12px; top:calc(var(--app-header-height,96px) + 68px); bottom:auto; width:auto; height:auto; max-height:calc(100dvh - var(--app-header-height,96px) - 80px - env(safe-area-inset-bottom)); border-radius:16px; }
 .map-layers-sections button { min-height:44px; }
}
@media(forced-colors:active) {
 .map-layers-option input { appearance:auto; width:22px; height:22px; }
 .map-layers-option input::before { content:none; }
}

.map-layers-directory { width:100%; min-height:44px; margin-top:4px; padding:8px 4px; text-align:center; font-size:13px; color:var(--ui-selected-text,#005bb5); }

.map-layers-place{display:block;width:100%;min-height:44px;margin:0 0 12px;text-align:left;background:var(--ui-field,#f5f5f7);border:1px solid var(--line,#e5e5ea);color:var(--ui-text,#1d1d1f);border-radius:12px;padding:10px 12px;font:inherit;cursor:pointer}

/* Explore exposes its two search targets without adding the optional layers. */
.map-layers-find-modes button { min-height:44px; }
