/* Shared discovery search: city pages and interactive catalog. */
html body .city-discovery .city-search,
html body .toolbar .search {
  border:1px solid #afd4f3;border-radius:16px;
  background:linear-gradient(110deg,#f2faff,#f6f8ff);
  box-shadow:0 2px 8px #174b7b05;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
html body .city-discovery .city-search {padding:8px 12px 8px 20px;gap:12px;}
html[data-public-theme="light"] body .city-discovery .city-search {background:linear-gradient(110deg,#f2faff,#f6f8ff);border-color:#afd4f3;}
html:not([data-public-theme="light"]) body .city-discovery .city-search,
html body.dark .toolbar .search {background:linear-gradient(110deg,#122437,#162238);border-color:#38536d;}
html body .city-search-icon {stroke:#1469ef;stroke-width:2.2;}
html body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search {
  background:linear-gradient(110deg,#008985,#1c5ce7);background-color:#1469db;
  color:#fff;border:1px solid transparent;border-radius:999px;
  box-shadow:inset 0 1px 0 #ffffff14;
  filter:none;transform:none;
  transition:box-shadow .18s ease,filter .18s ease,background-color .18s ease;
}
html body .city-discovery .city-search .hero-action.primary {min-height:44px;padding:12px 18px;font-size:14px;}
html body .city-discovery .city-search:focus-within,
html body .toolbar .search:focus-within {
  border-color:#6aaae2;box-shadow:0 0 0 3px #378bea12,0 4px 14px #2478bd08;
}
html body .city-discovery .city-search .hero-action.primary:focus-visible,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:focus-visible {
  outline:2px solid #7bb2e7;outline-offset:3px;box-shadow:0 0 0 4px #408fdf10;
}
@media(hover:hover) and (pointer:fine){
  html body .city-discovery .city-search:hover,
  html body .toolbar .search:hover {border-color:#85b7e6;box-shadow:0 0 0 2px #5b9edb0c,0 4px 16px #2365a10a;}
  html body .city-discovery .city-search .hero-action.primary:hover:not(:disabled),
  html:root[data-rumapa-buttons] body .toolbar .ai-map-search:hover:not(:disabled) {
    filter:brightness(1.06);transform:none;border-color:#ffffff24;
    box-shadow:0 4px 14px #1767be24,inset 0 1px 0 #ffffff28;
  }
}
html body .city-discovery .city-search .hero-action.primary:active:not(:disabled),
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:active:not(:disabled) {filter:brightness(.98);box-shadow:inset 0 1px 3px #083c6520;transform:none;}
html body .hero:has(.city-discovery) {
  border-radius:30px;box-shadow:0 8px 28px #0000000c;
  background:linear-gradient(135deg,#101c30,#0b1b2b);
}
html[data-public-theme="light"] body .hero:has(.city-discovery) {
  border-color:#dfe6ee;background:linear-gradient(115deg,#fdfcff 0%,#ffffff 48%,#f2faff 100%);
  box-shadow:0 8px 28px #27375205;
}
html body .hero:has(.city-discovery)::before {opacity:0;}
@media(max-width:480px){
  html body .hero:has(.city-discovery) {border-radius:24px;}
  html body .city-discovery .city-search {padding:6px 6px 6px 12px;gap:6px;}
  html body .city-discovery .city-search .hero-action.primary {padding:10px 12px;font-size:12px;}
}
@media(prefers-reduced-motion:reduce){
  html body .city-discovery .city-search,html body .toolbar .search,
  html body .city-discovery .city-search .hero-action.primary,
  html:root[data-rumapa-buttons] body .toolbar .ai-map-search {transition:none;}
}

/* Compact city header, aligned with the catalog overview. */
html body .hero:has(.city-discovery) {
  padding:clamp(24px,2.5vw,34px);
  margin:16px 0 12px;
}
html body .city-discovery h1 {
  font-size:clamp(28px,2.7vw,38px);
  line-height:1.12;
}
html body .city-discovery .shown-count {margin-top:10px;}
html body .city-map-guide {margin-top:4px;min-height:32px;}
@media(max-width:480px){
  html body .hero:has(.city-discovery) {padding:22px 20px;margin:12px 0 10px;}
  html body .city-discovery h1 {font-size:28px;}
}

/* Search action: pearl blue, distinct from the app-install gradient. */
html body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search {
  background:linear-gradient(135deg,#ffffff 0%,#e7f2ff 100%);color:#234f7d;border:1px solid #bbd3eb;
  border-radius:15px;font-weight:650;
  box-shadow:0 2px 6px #244b7610,inset 0 1px 0 #ffffff;
  filter:none;transform:none;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease;
}
@media(hover:hover) and (pointer:fine){
  html body .city-discovery .city-search .hero-action.primary:hover:not(:disabled),
  html:root[data-rumapa-buttons] body .toolbar .ai-map-search:hover:not(:disabled) {
    background:linear-gradient(135deg,#ffffff 0%,#d9ebff 100%);border-color:#8db9e0;filter:none;transform:none;
    box-shadow:0 0 0 3px #518fdc0d,0 3px 10px #2460a512;
  }
}
html body .city-discovery .city-search .hero-action.primary:focus-visible,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:focus-visible {
  outline:2px solid #80afe1;outline-offset:3px;box-shadow:0 0 0 4px #518fdc12;
}
html body .city-discovery .city-search .hero-action.primary:active:not(:disabled),
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:active:not(:disabled) {
  background:#deecfa;border-color:#8db9e0;filter:none;transform:none;
  box-shadow:inset 0 1px 3px #234f7d16;
}
@media(prefers-reduced-motion:reduce){
  html body .city-discovery .city-search .hero-action.primary,
  html:root[data-rumapa-buttons] body .toolbar .ai-map-search {transition:none;}
}

/* Price filters: consistent field rhythm and a clear primary action. */
html body .catalog-section .city-budget{width:min(360px,calc(100vw - 32px));padding:22px;gap:20px 16px;top:calc(100% + 12px);border-radius:20px;box-shadow:0 18px 48px #07142626;}
html body .catalog-section .city-budget label{gap:9px;font-size:13px;line-height:1.4;font-weight:600;min-width:0;}
html body .catalog-section .city-budget :is(input,select){box-sizing:border-box;width:100%;height:48px;min-height:48px;padding:11px 13px;font-size:16px;line-height:24px;border-radius:12px;outline-offset:3px;background:#16263f;}
html[data-public-theme="light"] body .catalog-section .city-budget :is(input,select){background:#f7f9fc;color:#172139;border-color:#d7e0ec;}
html body .catalog-section .city-budget button{min-height:46px;margin-top:4px;padding:11px 10px;font-size:14px;font-weight:600;line-height:22px;border-radius:12px;}
html body .catalog-section .city-budget button[type="submit"]{background:#1766d9;color:#fff;border-color:#1766d9;box-shadow:0 4px 12px #1766d91f;}
html body .catalog-section .city-budget button[type="submit"]:hover{background:#1058c2;border-color:#1058c2;color:#fff;}
html body .catalog-section .city-budget [data-clear-budget]{background:transparent;}
html body .budget-dialog .budget-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 16px;}
html body .budget-dialog .budget-fields> :last-child{grid-column:1/-1;}
html body .budget-dialog .budget-fields label{margin-bottom:9px;font-size:13px;font-weight:600;}
html body .budget-dialog .budget-fields :is(input,select){height:48px;padding:11px 13px;font-size:16px;border-radius:12px;}
html body .budget-dialog .budget-actions{gap:16px;margin-top:8px;}
@media(max-width:760px){html body .catalog-section .city-budget{position:fixed;top:50%;left:50%;right:auto;transform:translate(-50%,-50%);max-height:calc(100dvh - 32px);overflow:auto;z-index:60;}}

/* The list price filter uses the same centered dialog presentation as the map. */
html body dialog.city-price-dialog{box-sizing:border-box;width:min(400px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:28px;overflow:auto;border:1px solid #2b3547;border-radius:24px;background:#101726;color:#e9edf5;box-shadow:0 24px 70px #0003;font:inherit;}
html body dialog.city-price-dialog:not([open]){display:none;}
.city-price-dialog::backdrop{background:rgba(16,26,44,.62);}
html[data-public-theme="light"] body dialog.city-price-dialog{background:#fff;color:#172139;border-color:#dce3ed;}
.city-price-dialog .city-budget{position:static;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 16px;width:auto;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transform:none;}
.city-price-dialog h2{grid-column:1/-1;margin:0;font-size:24px;font-weight:750;line-height:1.3;letter-spacing:-.5px;}
.city-price-dialog .city-budget label{display:grid;gap:9px;min-width:0;font-size:13px;line-height:1.4;font-weight:600;}
.city-price-dialog .city-budget label:has(select){grid-column:1/-1;}
.city-price-dialog .city-budget :is(input,select){box-sizing:border-box;min-width:0;width:100%;height:48px;padding:11px 13px;border:1px solid #2b3547;border-radius:12px;background:#1b2435;color:inherit;font:400 16px/24px inherit;font-family:inherit;font-size:16px;}
.city-price-dialog input[type=number]{appearance:textfield;-moz-appearance:textfield;}
.city-price-dialog input::-webkit-inner-spin-button,.city-price-dialog input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
.city-price-dialog input::placeholder{color:#91a0b5;}
html[data-public-theme="light"] .city-price-dialog .city-budget :is(input,select){background:#fff;border-color:#dce3ed;}
.city-price-dialog .city-budget button{min-width:0;min-height:44px;padding:12px;border:1px solid #435571;border-radius:14px;color:inherit;background:#1b2435;font:inherit;font-size:14px;font-weight:650;cursor:pointer;}
html[data-public-theme="light"] .city-price-dialog .city-budget button{background:#fff;border-color:#dce3ed;}
html body .city-price-dialog .city-budget .city-price-apply{grid-column:1/-1;border:0;min-height:48px;background:linear-gradient(105deg,#00877e,#1d5be9);color:white;}
.city-price-dialog .city-price-actions{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:4px;}
.city-price-dialog button:disabled{opacity:.5;cursor:default;}
.city-price-dialog button:not(:disabled):hover{filter:brightness(1.07);}
.city-price-dialog :is(input,select,button):focus-visible{outline:2px solid #72a9ed;outline-offset:2px;}
@media(max-width:420px){html body dialog.city-price-dialog{padding:24px;}}
.city-price-dialog .city-budget label{grid-column:auto;}
.city-price-dialog .city-budget label:has(select){grid-column:1/-1;}
/* Price sorting adds a currency control: wrap whole controls, never their labels. */
html body .toolbar .filters {flex-wrap:wrap;align-items:center;gap:8px;}
html body .toolbar .filters > * {flex-shrink:0;max-width:100%;}
html body .toolbar .filters :is(button,.users-only) {white-space:nowrap;}
html body .toolbar .filters .catalog-sort {display:flex;flex-wrap:nowrap;flex-shrink:0;gap:8px;min-width:0;max-width:100%;}
html body .catalog-sort #catalog-sort {min-width:0;flex:1 1 auto;}
html body .catalog-sort #catalog-sort-currency {flex:0 0 88px;width:88px;}
html body .city-controls > * {flex-shrink:0;max-width:100%;}
html body .city-controls :is(.city-choice,.city-users,.city-account-actions > a) {white-space:nowrap;}
html body .city-account-actions {max-width:100%;}
html body .city-account-actions .city-sort {flex-wrap:nowrap;min-width:0;max-width:100%;}
html body .city-sort #city-sort {min-width:0;flex:1 1 auto;}
html body .city-sort #sort-money {flex:0 0 auto;}

/* Unified AI action for list and map discovery. */
html body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search {
 display:inline-flex;align-items:center;justify-content:center;gap:9px;flex-shrink:0;
 min-height:44px;padding:12px 18px;border-radius:14px;
 background:#14263f;color:#fff;
 border:1px solid #263c58;font-weight:650;line-height:1.25;white-space:nowrap;
 box-shadow:0 2px 5px #10233a18;
 transition:box-shadow .18s ease,filter .18s ease;filter:none;transform:none;
}
html body .city-discovery .city-search .hero-action.primary::before,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search::before {
 content:"";display:block;flex:0 0 20px;width:20px;height:20px;background:#6de3df;
 -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3l2.6 6.4L19 12l-6.4 2.6L10 21l-2.6-6.4L1 12l6.4-2.6L10 3zM19 1l1.1 2.9L23 5l-2.9 1.1L19 9l-1.1-2.9L15 5l2.9-1.1L19 1z'/%3E%3C/svg%3E") center/contain no-repeat;
 mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3l2.6 6.4L19 12l-6.4 2.6L10 21l-2.6-6.4L1 12l6.4-2.6L10 3zM19 1l1.1 2.9L23 5l-2.9 1.1L19 9l-1.1-2.9L15 5l2.9-1.1L19 1z'/%3E%3C/svg%3E") center/contain no-repeat;
}
@media(hover:hover) and (pointer:fine){
 html body .city-discovery .city-search .hero-action.primary:hover:not(:disabled),
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:hover:not(:disabled) {background:#1b3554;color:#fff;border-color:#3b607b;filter:none;transform:none;box-shadow:0 3px 9px #10233a24;}
}
html body .city-discovery .city-search .hero-action.primary:active:not(:disabled),
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:active:not(:disabled) {background:#102035;color:#fff;filter:none;transform:none;box-shadow:inset 0 2px 4px #06295730;}
html body .city-discovery .city-search .hero-action.primary:focus-visible,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:focus-visible {outline:2px solid #4596ef;outline-offset:3px;}
html body .city-discovery .city-search .hero-action.primary:disabled,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search:disabled {opacity:.6;cursor:wait;box-shadow:none;}
@media(max-width:480px){html body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search {padding:11px 12px;gap:6px;font-size:12px;} html body .city-discovery .city-search .hero-action.primary::before,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search::before {width:16px;height:16px;flex-basis:16px;}}
@media(prefers-reduced-motion:reduce){html body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body .toolbar .ai-map-search {transition:none;}}

/* A quiet edge keeps the navy action distinct on dark search surfaces. */
html:not([data-public-theme="light"]) body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body.dark .toolbar .ai-map-search {border-color:#466380;}

/* Lighter blue action on light surfaces; retain navy in dark mode. */
html[data-public-theme="light"] body .city-discovery .city-search .hero-action.primary,
html:root[data-rumapa-buttons] body:not(.dark) .toolbar .ai-map-search {background:#E7F1FF;border-color:#B8D3F2;color:#2256A0;box-shadow:0 2px 5px #2256a00a;}
@media(hover:hover) and (pointer:fine){
html[data-public-theme="light"] body .city-discovery .city-search .hero-action.primary:hover:not(:disabled),
html:root[data-rumapa-buttons] body:not(.dark) .toolbar .ai-map-search:hover:not(:disabled) {background:#DCEBFF;border-color:#96BDE9;color:#2256A0;box-shadow:0 3px 8px #2256a014;filter:none;}
}
html[data-public-theme="light"] body .city-discovery .city-search .hero-action.primary:active:not(:disabled),
html:root[data-rumapa-buttons] body:not(.dark) .toolbar .ai-map-search:active:not(:disabled) {background:#D2E5FC;border-color:#96BDE9;color:#2256A0;}

html[data-public-theme="light"] body .city-discovery .city-search .hero-action.primary::before,
html:root[data-rumapa-buttons] body:not(.dark) .toolbar .ai-map-search::before{background:#008D99;}

/* Shared category disclosure for map and list. */
html body #catalog-category[hidden]{display:none!important;}
html body .category-choice{position:relative;--category-bg:#101d33;--category-ink:#e9edf5;--category-muted:#a0adbf;--category-line:#7792b54d;}
html[data-public-theme="light"] body .category-choice,html body:not(.dark) .toolbar .category-choice{--category-bg:#fff;--category-ink:#172139;--category-muted:#77869a;--category-line:#dce4ee;}
html body .category-choice summary{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 15px;min-height:44px;color:var(--category-ink);background:var(--category-bg);border:1px solid var(--category-line);border-radius:999px;font-family:inherit;font-size:14px;font-weight:650;line-height:1.25;cursor:pointer;list-style:none;white-space:nowrap;}
html body .category-choice summary::-webkit-details-marker{display:none;}
html body .category-choice[open]>summary{border-color:#82b1e9;box-shadow:0 0 0 2px #3184ec12;}
html body .category-choice .catalog-nav{position:absolute;inset:auto auto auto 0;top:calc(100% + 6px);z-index:10020;display:grid;height:auto;gap:3px;width:240px;min-width:0;max-width:calc(100vw - 28px);max-height:min(60dvh,430px);overflow:auto;overscroll-behavior:contain;margin:0;padding:6px;background:var(--category-bg);color:var(--category-ink);border:1px solid var(--category-line);border-radius:16px;box-shadow:0 12px 34px #07142524;}
html body .category-choice:not([open]) .catalog-nav{display:none;}
html body .category-choice .category-chip{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;width:100%;margin:0;padding:12px 14px;border:0;border-radius:10px;background:transparent;color:var(--category-ink);font-family:inherit;font-size:14px;line-height:1.3;font-weight:650;text-decoration:none;text-align:left;cursor:pointer;}
html body .category-choice .category-chip span{color:var(--category-muted);font-size:12px;font-variant-numeric:tabular-nums;}
html body .category-choice .category-chip:hover{background:#3084e814;}
html body .category-choice .category-chip.active{background:linear-gradient(110deg,#008985,#1c5ce7);color:#fff;}
html body .category-choice .category-chip.active span{color:#fff;}
html body .category-choice :is(summary,.category-chip):focus-visible{outline:2px solid #3285e9;outline-offset:2px;}
@media(max-width:600px){html body .category-choice .catalog-nav{position:fixed;top:auto;left:14px;right:14px;width:auto;max-width:none;margin-top:6px;max-height:52dvh;}}
