/* Shared public-map chrome. Basemap colors are changed in theme-sync.js,
   not by filtering the canvas (which would distort prices and status colors). */
html[data-mh-shell="public"]{
  --mulk-map-surface:var(--em-surface,var(--surface,#fff));
  --mulk-map-soft:var(--em-surface-soft,var(--surface-soft,#eef4f1));
  --mulk-map-text:var(--em-text,var(--text,#07172a));
  --mulk-map-muted:var(--em-muted,var(--muted,#66756f));
  --mulk-map-line:var(--em-line,var(--line,#dce8e3));
  --mulk-map-accent:var(--em-accent,var(--accent,#00c268));
  --mulk-map-icon-filter:none;
}
html[data-mh-shell="public"][data-em-theme="dark"]{
  --mulk-map-icon-filter:invert(1) brightness(1.2);
}
html[data-mh-shell="public"] .em-map-stage,
html[data-mh-shell="public"] .maplibregl-map{background:var(--mulk-map-soft)}
html[data-mh-shell="public"] [data-testid="market-map"] .mh-invest-glass,
html[data-mh-shell="public"] [data-testid="market-map"] .mh-map-toast,
html[data-mh-shell="public"] [data-testid="market-map-filters"]{
  background:var(--mulk-map-surface)!important;
  background:color-mix(in srgb,var(--mulk-map-surface) 95%,transparent)!important;
  color:var(--mulk-map-text);
  border-color:var(--mulk-map-line);
  box-shadow:0 8px 24px rgba(10,34,27,.08);
}
html[data-mh-shell="public"] [data-testid="market-map-filters"] [aria-pressed="false"]{
  color:var(--mulk-map-muted);
}
html[data-mh-shell="public"] [data-testid="market-map-filters"] [aria-pressed="true"]{
  background:var(--mulk-map-accent)!important;
  color:#002b20!important;
  border-color:transparent;
}
html[data-mh-shell="public"] [data-testid="market-map"] .mh-map-toast--error{border-color:#d4656e}
html[data-mh-shell="public"] .maplibregl-ctrl-group{
  background:var(--mulk-map-surface)!important;
  color:var(--mulk-map-text);
  border:1px solid var(--mulk-map-line);
  box-shadow:0 3px 14px rgba(10,34,27,.15);
}
html[data-mh-shell="public"] .maplibregl-ctrl-group button{
  background-color:transparent!important;
  border-color:var(--mulk-map-line);
  color:var(--mulk-map-text);
}
html[data-mh-shell="public"] .maplibregl-ctrl-group button:not(:disabled):hover{
  background-color:var(--mulk-map-soft)!important;
}
html[data-mh-shell="public"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon{
  filter:var(--mulk-map-icon-filter)!important;
}
/* Keep location/error indicator colors semantic rather than inverting them. */
html[data-mh-shell="public"] .maplibregl-ctrl-group button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{filter:none!important}
html[data-mh-shell="public"] .maplibregl-ctrl-scale{
  background:var(--mulk-map-surface)!important;
  color:var(--mulk-map-text)!important;
  border-color:var(--mulk-map-muted);
}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib,
html[data-mh-shell="public"] .maplibregl-ctrl-attrib a{
  background:var(--mulk-map-surface)!important;
  color:var(--mulk-map-muted)!important;
}
/* One 44px information control. The stock 24px background was tiled inside
   the site's 44px touch target and clipped by a 24px parent. Keep MapLibre's
   native details/summary behavior and all source links. */
html[data-mh-shell="public"] .maplibregl-ctrl-attrib.maplibregl-compact{
  min-width:44px;min-height:44px;padding:0;margin:10px;
  border:1px solid var(--mulk-map-line);border-radius:12px;box-sizing:border-box;
  max-width:calc(100vw - 100px);box-shadow:0 3px 14px rgba(10,34,27,.12);
}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib.maplibregl-compact-show{padding:10px 52px 10px 12px}
html[data-mh-shell="public"] :is(.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-top-left)>.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:10px 12px 10px 52px}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib.maplibregl-compact:after{content:none;background-image:none}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib-button{
  width:44px;height:44px;min-width:44px;min-height:44px;
  background:transparent!important;background-repeat:no-repeat!important;
  color:var(--mulk-map-text);border-radius:12px;list-style:none;
}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib-button:before{
  content:'';display:block;width:22px;height:22px;margin:10px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.1'/%3E%3C/g%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%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.1'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib-button:focus-visible{outline:2px solid var(--mulk-map-accent);outline-offset:2px}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib-inner{font-size:11px;line-height:1.6;overflow-wrap:anywhere}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib-inner a{text-decoration:underline}

/* Marker coordinates belong to the dot's centre. The label sits above it,
   without changing MapLibre's transform or intercepting map gestures. */
html[data-mh-shell="public"] .mulk-user-location{
  --mulk-pin-surface:rgba(247,253,250,.94);--mulk-pin-tip:#f2faf6;
  --mulk-pin-text:#172a35;--mulk-pin-edge:rgba(82,185,144,.58);
  --mulk-pin-highlight:rgba(255,255,255,.95);
  width:18px;height:18px;pointer-events:none;z-index:5;overflow:visible;
}
html[data-mh-shell="public"] .mulk-user-location-dot{
  display:block;width:18px;height:18px;box-sizing:border-box;border:3px solid #edfff6;
  border-radius:50%;background:#16b977;
  box-shadow:0 0 0 4px rgba(38,200,139,.14),0 0 16px rgba(27,193,130,.38),0 2px 6px rgba(5,43,30,.2);
}
html[data-mh-shell="public"] .mulk-user-location-label{
  display:flex;align-items:center;justify-content:center;gap:10px;direction:ltr;
  width:max-content;min-width:132px;max-width:calc(100vw - 48px);height:44px;
  box-sizing:border-box;padding:7px 14px;border:1px solid var(--mulk-pin-edge);border-radius:999px;
  background:linear-gradient(145deg,rgba(255,255,255,.34),rgba(229,247,240,.05)),var(--mulk-pin-surface);
  color:var(--mulk-pin-text)!important;
  font:700 14px/1.4 'Vazirmatn',system-ui,sans-serif;text-align:center;white-space:nowrap;
  box-shadow:inset 0 1px 0 var(--mulk-pin-highlight),0 4px 16px rgba(13,74,52,.14);
  -webkit-backdrop-filter:blur(12px) saturate(125%);backdrop-filter:blur(12px) saturate(125%);
  pointer-events:none;
}
html[data-mh-shell="public"] .mulk-user-location>.mulk-user-location-label{position:absolute;bottom:26px;left:50%;transform:translateX(-50%)}
html[data-mh-shell="public"] .mulk-user-location-label:after{
  content:'';position:absolute;bottom:-6px;left:50%;width:10px;height:10px;
  background:var(--mulk-pin-tip);border-right:1px solid var(--mulk-pin-edge);border-bottom:1px solid var(--mulk-pin-edge);
  transform:translateX(-50%) rotate(45deg);border-bottom-right-radius:2px;
}
html[data-mh-shell="public"] .mulk-user-location-brand{
  position:relative;display:block;flex:0 0 31px;width:31px;aspect-ratio:314/229;overflow:hidden;
}
html[data-mh-shell="public"] .mulk-user-location-brand img{
  position:absolute;display:block;width:226.115%;height:auto;max-width:none;
  left:-62.42%;top:-4.804%;border:0;border-radius:0;object-fit:initial;
}
html[data-mh-shell="public"] .mulk-user-location-text{display:block;min-width:0;unicode-bidi:isolate}
html[data-mh-shell="public"] .mulk-user-location-google{position:absolute;transform:translate(-50%,-50%)}
html[data-mh-shell="public"][data-em-theme="dark"] .mulk-user-location{
  --mulk-pin-surface:rgba(23,47,59,.94);--mulk-pin-tip:#1b3540;--mulk-pin-text:#f3fff9;
  --mulk-pin-edge:rgba(98,211,164,.6);--mulk-pin-highlight:rgba(198,251,226,.24);
}
html[data-mh-shell="public"][data-em-theme="dark"] .mulk-user-location-label{
  background:linear-gradient(145deg,rgba(177,217,225,.12),rgba(18,44,52,.04)),var(--mulk-pin-surface);
  box-shadow:inset 0 1px 0 var(--mulk-pin-highlight),0 5px 18px rgba(0,10,19,.35);
}
@media(forced-colors:active){
  html[data-mh-shell="public"] .mulk-user-location{--mulk-pin-surface:Canvas;--mulk-pin-tip:Canvas;--mulk-pin-text:CanvasText;--mulk-pin-edge:CanvasText}
  html[data-mh-shell="public"] .mulk-user-location-label{background:Canvas}
  html[data-mh-shell="public"] .mulk-user-location-dot{background:Highlight;border-color:CanvasText}
}
html[data-mh-shell="public"] [data-mode="full"]>.mulk-map-locate-host{margin-bottom:14px}
html[data-mh-shell="public"] .maplibregl-popup-content{
  background:var(--mulk-map-surface);
  color:var(--mulk-map-text);
  border:1px solid var(--mulk-map-line);
}
html[data-mh-shell="public"] .maplibregl-popup-content a{color:var(--mulk-map-text)}
html[data-mh-shell="public"] .maplibregl-popup-anchor-top .maplibregl-popup-tip,
html[data-mh-shell="public"] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
html[data-mh-shell="public"] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{border-bottom-color:var(--mulk-map-surface)}
html[data-mh-shell="public"] .maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
html[data-mh-shell="public"] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
html[data-mh-shell="public"] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{border-top-color:var(--mulk-map-surface)}
html[data-mh-shell="public"] .maplibregl-popup-anchor-left .maplibregl-popup-tip{border-right-color:var(--mulk-map-surface)}
html[data-mh-shell="public"] .maplibregl-popup-anchor-right .maplibregl-popup-tip{border-left-color:var(--mulk-map-surface)}
@media(forced-colors:active){
  html[data-mh-shell="public"] .maplibregl-ctrl-group{background:Canvas!important;color:CanvasText!important}
  html[data-mh-shell="public"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon{filter:none!important}
}

/* Shared public map: filters above, canvas in its own row, status below.
   The map DOM, camera, data layers and event handlers stay mounted. */
html[data-mh-shell="public"] [data-testid="market-map"][data-map-layout="framed"]{
  --mulk-map-height:460px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto var(--mulk-map-height) auto auto;
  background:var(--mulk-map-surface);
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-toolbar{
  grid-area:1/1;position:static;inset:auto;padding:10px;gap:8px;
  border-bottom:1px solid var(--mulk-map-line);
}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-filters"]{
  display:flex;flex-wrap:wrap;overflow:visible;gap:8px;padding:0;
  border:0;box-shadow:none;background:var(--mulk-map-surface)!important;
}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-filters"]>div{
  display:flex;flex-wrap:wrap;min-width:0;max-width:100%;gap:4px;
}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-filters"]>div:first-child{
  flex:1 1 100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-filters"] button{
  min-height:44px;padding:7px 10px;font-size:.8rem;line-height:1.5;
  white-space:normal;overflow-wrap:anywhere;
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-viewport{
  grid-area:2/1;height:var(--mulk-map-height)!important;min-height:0;
  position:relative;min-width:0;overflow:hidden;
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-loading{
  grid-area:2/1;position:relative;inset:auto;align-self:center;justify-self:center;
  max-width:calc(100% - 32px);
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-legend-host,
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-locate-host{
  grid-area:2/1;position:relative;inset:auto;align-self:end;margin:0 12px 64px;
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-legend-host{justify-self:start;max-width:calc(100% - 86px)}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-locate-host{justify-self:end}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-legend"]>div{max-width:100%}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-status{
  grid-area:3/1;position:static;inset:auto;padding:10px;
  border-top:1px solid var(--mulk-map-line);font-size:.82rem;
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-status:not(:has(.mh-map-toast)){display:none}
html[data-mh-shell="public"] [data-map-layout="framed"] .mulk-map-status .mh-map-toast{
  width:100%;max-width:none;margin:0;padding:4px;border:0;border-radius:0;
  box-shadow:none;color:var(--mulk-map-text);background:transparent!important;
  text-align:start;line-height:1.8;
}
html[data-mh-shell="public"] [data-map-layout="framed"]>.mulk-map-selection{
  grid-area:4/1;position:static;inset:auto;max-height:none;
}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-card"]{width:100%;max-height:360px;border-radius:0}
html[data-mh-shell="public"] .pr-location-map{height:auto;min-height:460px}
@media(max-width:767px){
  html[data-mh-shell="public"] [data-testid="market-map"][data-map-layout="framed"]{--mulk-map-height:clamp(390px,60svh,520px)}
  html[data-mh-shell="public"] .em-map-stage .em-map-placeholder{min-height:390px}
}

/* Four movement choices, one row; zero horizontal scrolling in the embedded map. */
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-filters"]>div:nth-child(2){
 flex:1 1 100%;width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;
}
html[data-mh-shell="public"] [data-map-layout="framed"] [data-testid="market-map-filters"]>div:nth-child(2)>button{
 min-width:0;width:100%;min-height:44px;padding:6px 3px;white-space:nowrap;overflow-wrap:normal;gap:3px;
 font-size:clamp(.67rem,2.8vw,.80rem);letter-spacing:0;
}
html[data-mh-shell="public"] .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner{display:none}
