.market-view-tabs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;width:100%;padding:6px 0;box-sizing:border-box;direction:ltr;text-align:left}.market-view-tabs button{flex:0 0 auto;width:auto!important;min-height:34px;padding:6px 11px;border:1px solid #879eaf;border-radius:9px;background:#eaf0f5;color:#263e51;font:600 13px Dubai,Arial,sans-serif;line-height:1.4;white-space:nowrap;cursor:pointer}.market-view-tabs button[aria-pressed=true]{background:#24475e;border-color:#24475e;color:#fff}.market-view-tabs button:focus-visible{outline:2px solid #508cc0;outline-offset:2px}.market-view-tabs .market-advanced{margin-inline-start:auto;background:#fff;color:#2b465b}.has-market-view-tabs #globalFiltersButton,.has-market-view-tabs #openOffplanProjectCatalog{display:none!important}.market-gallery-advanced{margin:8px 0 12px;padding:10px;border:1px solid #c6d5df;border-radius:10px;background:#f3f6f9}.market-gallery-advanced>summary{font:600 13px Dubai,Arial,sans-serif;cursor:pointer}.market-gallery-advanced>summary::-webkit-details-marker{display:none}#marketViewStatus{font:13px Dubai,Arial,sans-serif;color:#7c3640;margin:4px 0}#propertyInventory[data-market-metric=roi] .property-metrics,#propertyInventory[data-market-metric=capital] .property-metrics{font-weight:700}@media(max-width:650px){.market-view-tabs{gap:5px;padding:5px 0}.market-view-tabs button{font-size:11px;min-height:32px;padding:6px 8px;border-radius:8px}.market-view-tabs .market-advanced{margin-inline-start:0}.market-gallery-advanced{padding:8px}}

.map-stage>.market-view-tabs{position:absolute;z-index:1600;top:8px;left:52px;right:52px;width:auto;max-width:calc(100% - 104px);padding:7px;border:1px solid #c1d0dc;border-radius:12px;background:rgba(244,248,251,.94);box-shadow:0 3px 12px #14334a22;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.map-stage.side-gallery-open>.market-view-tabs{right:350px;max-width:calc(100% - 402px)}.market-view-tabs{grid-column:1/-1!important}.has-market-view-tabs #filterShortcut{display:none!important}@media(max-width:650px){.map-stage>.market-view-tabs,.map-stage.side-gallery-open>.market-view-tabs{left:48px;right:48px;max-width:calc(100% - 96px);top:7px;padding:5px;gap:4px}.map-stage>.market-view-tabs button{font-size:11px;min-height:29px;padding:5px 7px}.map-stage>.market-view-tabs .market-advanced{margin-inline-start:0}}

/* Keep the market tags below map navigation, outside the tools popup. */
.map-stage>.market-view-tabs{top:56px}
@media(max-width:650px){.map-stage>.market-view-tabs,.map-stage.side-gallery-open>.market-view-tabs{top:80px;left:12px;right:12px;max-width:calc(100% - 24px);direction:ltr!important;text-align:left!important}.has-market-view-tabs .mapnote{display:none!important}}

/* The shared market tabs replace the legacy status chips; map navigation stays available. */
body.has-market-view-tabs .map-stage>.map-status,
body.has-market-view-tabs .map-stage>.mapnote{display:none!important}
/* Match the AI launcher's row below the measured tabs, including wrapped translations. */
body.has-market-view-tabs .map-stage>#openPropertyAR.ar-launch{display:inline-flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;top:var(--ai-market-controls-top,190px)!important;right:12px!important;left:auto!important;bottom:auto!important;z-index:1700!important}


/* Content-sized map tags: each pill follows its own label, not a shared grid cell. */
body.has-market-view-tabs .map-stage > [data-market-view-tabs="map"]{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-content:flex-start!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:max-content!important;
  max-width:calc(100% - 110px)!important;
  min-width:0!important;
  right:auto!important;
  gap:5px!important;
}
body.has-market-view-tabs .map-stage > [data-market-view-tabs="map"] > button[data-market-view]{
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0!important;
  padding:6px 10px!important;
  margin:0!important;
  white-space:nowrap!important;
  text-overflow:clip!important;
}
body.has-market-view-tabs .map-stage > [data-market-view-tabs="map"] > #country{
  flex:0 1 170px!important;
  width:170px!important;
  min-width:110px!important;
  max-width:170px!important;
}
body.has-market-view-tabs .map-stage.side-gallery-open > [data-market-view-tabs="map"]{
  max-width:calc(100% - 455px)!important;
}
/* Fullscreen tracks the AR icon after wrapped labels or locale changes. */
@media(max-width:1120px){
  body.has-market-view-tabs .map-stage > #fullscreen{
    top:calc(var(--ai-market-controls-top,190px) + 58px)!important;
    right:12px!important;
  }
}
@media(max-width:650px){
  body.has-market-view-tabs .map-stage > [data-market-view-tabs="map"]{
    left:12px!important;
    max-width:calc(100% - 24px)!important;
    padding:5px!important;
  }
  body.has-market-view-tabs .map-stage > [data-market-view-tabs="map"] > button[data-market-view]{
    padding:5px 8px!important;
  }
  body.has-market-view-tabs .map-stage > #fullscreen{right:10px!important}
}


/* 2026-11-10: approved two-row, map-first mobile layout. Desktop and gallery are unchanged. */
.market-country-quick{display:none}
@media(max-width:650px){
  body.has-market-view-tabs .map-stage>.maptop{display:none!important}
  body.has-market-view-tabs .map-stage .listing-map-coverage,
  body.has-market-view-tabs .map-stage #listingMapCoverage{display:none!important}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"],
  body.has-market-view-tabs .map-stage.side-gallery-open>[data-market-view-tabs="map"]{
    display:grid!important;
    grid-template-columns:.95fr 1.18fr .78fr .60fr .60fr 2.03fr!important;
    grid-template-rows:auto auto!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    column-gap:3px!important;
    row-gap:5px!important;
    box-sizing:border-box!important;
    top:8px!important;
    left:42px!important;
    right:8px!important;
    width:calc(100% - 50px)!important;
    max-width:calc(100% - 50px)!important;
    min-width:0!important;
    padding:6px!important;
    border-radius:12px!important;
    background:rgba(247,250,253,.95)!important;
  }
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>button[data-market-view],
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>.market-advanced{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:32px!important;
    padding:5px 2px!important;
    box-sizing:border-box!important;
    font-size:clamp(8.2px,2.5vw,11px)!important;
    line-height:1.2!important;
    letter-spacing:-.12px!important;
    white-space:nowrap!important;
    text-align:center!important;
    margin:0!important;
  }
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="resale"]{grid-column:1;grid-row:1}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="off_plan"]{grid-column:2;grid-row:1}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="rent"]{grid-column:3;grid-row:1}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="roi"]{grid-column:4;grid-row:1}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="capital"]{grid-column:5;grid-row:1}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="transaction_sale"]{grid-column:6;grid-row:1}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>.market-country-quick{
    display:flex!important;
    position:relative;
    box-sizing:border-box;
    grid-column:1/3;
    grid-row:2;
    align-items:center;
    justify-content:space-between;
    border:1px solid #879eaf;
    border-radius:9px;
    min-width:0;
    min-height:32px;
    padding:5px 8px;
    background:#fff;
    color:#263e51;
    font:600 clamp(9px,2.7vw,12px)/1.2 Dubai,Arial,sans-serif;
    direction:ltr;
  }
  .map-stage .market-country-quick span{display:flex;align-items:center;gap:7px}
  .map-stage .market-country-quick i{
    display:block;width:7px;height:7px;border:solid currentColor;border-width:0 1.5px 1.5px 0;
    transform:translateY(-2px) rotate(45deg);
  }
  .map-stage .market-country-quick select{
    position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;
    -webkit-appearance:none;appearance:none;font-size:16px;
  }
  .map-stage .market-country-quick:focus-within{outline:2px solid #508cc0;outline-offset:2px}
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>[data-market-view="transaction_rent"]{
    grid-column:3/6;grid-row:2;
  }
  body.has-market-view-tabs .map-stage>[data-market-view-tabs="map"]>.market-advanced{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    grid-column:6;grid-row:2;
  }
  /* Keep AR and the same working Fullscreen/Exit control stacked at the right. */
  body.has-market-view-tabs .map-stage>#openPropertyAR.ar-launch{
    top:var(--ai-market-controls-top,105px)!important;right:10px!important;left:auto!important;
  }
  body.has-market-view-tabs .map-stage>#fullscreen{
    top:calc(var(--ai-market-controls-top,105px) + 58px)!important;
    right:10px!important;left:auto!important;
  }
}
/* Country is provided in the two-row map box only on phones; retain the full picker elsewhere. */


/* Tablet map chrome: one centred first row, without legacy map panels.
   Phones retain their dedicated two-row layout; fine-pointer desktops retain theirs. */
@media (min-width:651px) and (max-width:1120px),
       (min-width:651px) and (max-width:1600px) and (any-pointer:coarse){
 body.has-market-view-tabs .mapwrap .map-stage > .market-view-tabs[data-market-view-tabs="map"],
 body.has-market-view-tabs .mapwrap .map-stage.side-gallery-open > .market-view-tabs[data-market-view-tabs="map"]{
  position:absolute!important;z-index:1600!important;
  top:8px!important;left:50%!important;right:auto!important;bottom:auto!important;
  transform:translateX(-50%)!important;
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:flex-start!important;
  width:max-content!important;max-width:calc(100% - 128px)!important;min-width:0!important;
  margin:0!important;padding:6px!important;gap:5px!important;
  overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;
  box-sizing:border-box!important;direction:ltr!important;text-align:left!important;
 }
 body.has-market-view-tabs .mapwrap .map-stage > .market-view-tabs[data-market-view-tabs="map"]::-webkit-scrollbar{display:none}
 body.has-market-view-tabs .mapwrap .map-stage > .market-view-tabs[data-market-view-tabs="map"] > button{
  flex:0 0 auto!important;width:max-content!important;max-width:none!important;
  min-width:0!important;min-height:34px!important;margin:0!important;
  padding:6px 8px!important;font-size:clamp(10px,1.05vw,13px)!important;
  white-space:nowrap!important;
 }
 body.has-market-view-tabs .mapwrap .map-stage > .maptop,
 body.has-market-view-tabs .mapwrap .map-stage > #filterShortcut,
 body.has-market-view-tabs .mapwrap .map-stage > .map-status,
 body.has-market-view-tabs .mapwrap .map-stage > .mapnote,
 body.has-market-view-tabs .mapwrap .map-stage > .coverage,
 body.has-market-view-tabs .mapwrap .listing-map-coverage,
 body.has-market-view-tabs .mapwrap #listingMapCoverage,
 body.has-market-view-tabs .mapwrap .compact-credit-control,
 body.has-market-view-tabs .mapwrap > .fullscreen-toolbar,
 body.has-market-view-tabs .mapwrap .market-view-tabs > #country,
 body.has-market-view-tabs .mapwrap .market-country-quick{display:none!important}
 body.has-market-view-tabs .mapwrap .map-stage > #openPropertyAR.ar-launch{
  top:var(--ai-market-controls-top,68px)!important;right:12px!important;
  left:auto!important;bottom:auto!important;
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
 }
 body.has-market-view-tabs .mapwrap .map-stage > #fullscreen{
  top:calc(var(--ai-market-controls-top,68px) + 52px)!important;
  right:12px!important;left:auto!important;bottom:auto!important;
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
 }
}
