/* Ai HOMES V2 skin over the ORIGINAL Meter module.
 * Intentionally preserve its four 1/2/3 instruments, original grid geometry,
 * AR/GPS/Street streaming, native map picker, sensor permissions and focus view.
 * This file changes only visual styling and never invents numerical values.
 */
@font-face{
 font-family:AiDubai;src:url("/fonts/Dubai-Regular.ttf") format("truetype");
 font-weight:400;font-style:normal;font-display:swap;
}
@font-face{
 font-family:AiDubai;src:url("/fonts/Dubai-Bold.ttf") format("truetype");
 font-weight:700;font-style:normal;font-display:swap;
}
#meterView{
 --v2-meter-dark:#0d1c2e;
 --v2-meter-navy:#19374e;
 --v2-meter-blue:#254c68;
 --v2-meter-line:#7998af;
 --v2-meter-silver:#c6dce9;
 --v2-meter-ice:#eff8ff;
 --v2-meter-highlight:#74b3dc;
 background:linear-gradient(155deg,#102137,#091827 86%)!important;
 color:var(--v2-meter-ice)!important;
 font-family:AiDubai,Dubai,Inter,Arial,sans-serif!important;
}
#meterView :is(button,input,select,output){
 font-family:AiDubai,Dubai,Inter,Arial,sans-serif!important;
}
#meterView :is(.meter-top,.meter-status,.meter-switches,.meter-selected-tags){
 border-color:rgba(153,187,211,.49)!important;
 color:#e8f6ff!important;
}
#meterView .meter-top{
 background:rgba(13,35,55,.94)!important;
 border:1px solid rgba(139,172,195,.55)!important;
 border-radius:13px!important;
 padding:6px 9px!important;
}
#meterView .meter-wordmark{
 font-weight:800!important;
 color:#f4fbff!important;
 text-decoration:none!important;
}
#meterView .meter-wordmark span{
 color:var(--v2-meter-silver)!important;
 font-weight:500!important;
}
#meterView .meter-pages{
 border:1px solid #799db6!important;
 border-radius:11px!important;
 background:#173952!important;
}
#meterView .meter-pages [aria-pressed="true"],#meterView .meter-pages [aria-current="page"]{
 color:#fff!important;
 background:#356b91!important;
 border-color:#b9d7e9!important;
}
#meterView .meter-card{
 background:rgba(21,51,76,.94)!important;
 border:1px solid rgba(157,191,213,.75)!important;
 color:#eff9ff!important;
 border-radius:15px!important;
 box-shadow:none!important;
}
#meterView .meter-card-head h2,
#meterView .meter-title-label{
 color:#deedf7!important;
 font-weight:700!important;
}
#meterView .meter-instrument .meter-value{
 color:#f9fcff!important;
 font-weight:800!important;
 letter-spacing:-.015em!important;
 font-variant-numeric:tabular-nums;
}
#meterView .meter-instrument .meter-unit,
#meterView .meter-card-foot,
#meterView .meter-evidence{
 color:#b2ccdc!important;
}
#meterView .meter-dial .meter-arc{
 stroke:rgba(145,187,214,.46)!important;
}
#meterView .meter-dial .meter-fill{
 stroke:#7fbde7!important;
}
#meterView .meter-needle{
 stroke:#9bd5f6!important;
}
#meterView .meter-distance-control{
 background:rgba(21,53,76,.95)!important;
 border:1px solid #789db6!important;
 border-radius:12px!important;
 box-shadow:none!important;
}
#meterView #meterRadius{accent-color:#8bc8eb!important}
#meterView .meter-start{
 background:#d9ebf8!important;
 color:#12354e!important;
 border-color:#b9d9ed!important;
 font-weight:800!important;
}
#meterView .meter-top :is(button,.meter-start):focus-visible,
#meterView .meter-pages button:focus-visible,
#meterView .meter-switches button:focus-visible{
 outline:3px solid #c8eaff!important;
 outline-offset:2px!important;
}
#meterView .meter-switches :is(select,button){
 background:rgba(25,57,80,.96);
 border-color:#769db8!important;
 color:#eff9ff!important;
 border-radius:9px!important;
}
#meterView .meter-switches [aria-pressed="true"],
#meterView .meter-switches [aria-current="page"]{
 background:#356e94!important;color:#fff!important;
}
#meterView.meter-transparent{background:transparent!important}
#meterView.meter-transparent::backdrop{background:#071320d9}
#meterView.meter-transparent .meter-card{
 background:rgba(9,29,48,.79)!important;
 border-color:rgba(169,203,223,.75)!important;
 backdrop-filter:blur(8px) saturate(115%)!important;
 -webkit-backdrop-filter:blur(8px) saturate(115%)!important;
}
#meterView.meter-transparent .meter-scene:after{
 content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
 background:linear-gradient(to bottom,rgba(11,26,45,.2),rgba(8,26,44,.33));
}
#meterView.meter-transparent #meterGrid,
#meterView.meter-transparent .meter-top{
 position:relative;z-index:3;
}
#meterView.meter-focus-mode .meter-card{
 background:rgba(19,48,72,.96)!important;
 border-color:#90b3cb!important;
}
#meterView .meter-location-dialog,
#meterView .meter-number-details,#meterFilters{
 background:#173249!important;border-color:#86aaca!important;
 color:#f1f8fc!important;
}
@media(max-width:650px){
 #meterView .meter-top{border-radius:10px!important;padding:4px 6px!important}
 #meterView .meter-card{border-radius:12px!important}
 #meterView .meter-pages{border-radius:8px!important}
}
/* Keep the ORIGINAL Meter responsive grid untouched: 4 instruments, not 8. */

/* Meter spacing hotfix 2026-11-14.
   The original #meterGrid was a flex item with an older margin:auto rule,
   which could vertically centre the four cards hundreds of pixels below the
   property/scene tags in iOS. It must follow the tags immediately.
   No changes to the 1/2/3 scenarios, source computations or GPS. */
#meterView[open]{
 justify-content:flex-start!important;
 align-content:flex-start!important;
}
#meterView>.meter-selected-tags{
 flex:0 0 auto!important;
 margin:0!important;
 padding:0!important;
}
#meterView #meterGrid,
#meterView.meter-immersive #meterGrid{
 position:relative!important;
 top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
 flex:0 0 auto!important;
 align-self:stretch!important;
 margin:0 auto!important;
 padding:0!important;
 height:auto!important;
 min-height:0!important;
 max-height:none!important;
 grid-template-rows:none!important;
 grid-auto-rows:auto!important;
 align-content:start!important;
 transform:none!important;
}
#meterView>.meter-distance-control{
 flex:0 0 auto!important;
 margin:0 auto!important;
}
@media(max-width:1024px){
 #meterView[open]{
  justify-content:flex-start!important;
  gap:6px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
 }
 #meterView>.meter-top{flex:0 0 auto!important;margin:0!important}
 #meterView>.meter-status{flex:0 0 auto!important;margin:0!important;padding:0 3px!important}
 #meterView>.meter-toolbar{flex:0 0 auto!important;margin:0!important}
 #meterView>.meter-switches{
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
  gap:5px!important;
 }
 #meterView .meter-switches :is(button,select){
  min-height:32px!important;
  padding:6px 9px!important;
 }
 #meterView>.meter-selected-tags{min-height:29px!important;gap:6px!important}
 #meterView>.meter-selected-tags strong{
  padding:5px 9px!important;
  font-size:clamp(13px,2.4vw,17px)!important;
 }
 #meterView #meterGrid,
 #meterView.meter-immersive #meterGrid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:none!important;
  grid-auto-rows:auto!important;
  gap:8px!important;
  margin-top:0!important;margin-bottom:0!important;
  width:100%!important;max-width:100%!important;
  flex:0 0 auto!important;
  min-height:0!important;height:auto!important;max-height:none!important;
 }
 #meterView #meterGrid>.meter-card{
  align-self:stretch!important;
  min-height:148px!important;
  height:clamp(148px,23dvh,195px)!important;
  max-height:none!important;
  aspect-ratio:auto!important;
 }
 #meterView>.meter-distance-control{
  margin:2px auto 0!important;
  min-height:43px!important;
 }
}
@media(max-width:520px){
 #meterView[open]{gap:5px!important}
 #meterView>.meter-top{
  grid-template-rows:38px 43px!important;
  min-height:88px!important;
  row-gap:5px!important;
 }
 #meterView .meter-pages button{min-height:35px!important}
 #meterView #meterGrid>.meter-card{
  min-height:142px!important;
  height:clamp(142px,22dvh,175px)!important;
  padding:8px!important;
 }
 #meterView .meter-card-head h2{font-size:clamp(14px,4cqi,18px)!important}
 #meterView .meter-instrument .meter-value{line-height:1.05!important}
 #meterView>.meter-selected-tags{min-height:26px!important}
 #meterView>.meter-distance-control{min-height:41px!important}
}
@media(max-width:1024px) and (orientation:landscape) and (max-height:650px){
 #meterView #meterGrid,
 #meterView.meter-immersive #meterGrid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
 #meterView #meterGrid>.meter-card{
  min-height:125px!important;
  height:clamp(125px,31dvh,170px)!important;
 }
}
/* Preserve the original iOS Focus display: 2x2 counters, no blank rail. */
#meterView.meter-focus-mode #meterGrid,
#meterView.meter-focus-mode.meter-immersive #meterGrid{
 margin-top:0!important;
 margin-bottom:0!important;
 align-content:start!important;
 flex:0 0 auto!important;
 max-height:none!important;
}

/* 2026-11-15 ROI-mobile-fit fix: protect the numeric ROI value from the
   two-line area-estimate caption in a 2x2 iPhone AR/GPS Meter. The original
   period, GPS, comparison and calculation engines are unchanged. */
@media (max-width: 650px) {
  #meterView .meter-card[data-estimated="true"] .meter-evidence {
    /* The footer already explicitly says "Est." and shows the observation
       radius + sale/rent sample counts. Full method remains in title. */
    display:none!important;
  }
  #meterView .meter-card[data-estimated="true"] .meter-instrument {
    min-height:50px!important;
    overflow:visible!important;
  }
  #meterView .meter-card[data-estimated="true"] .meter-value-wrap {
    max-height:none!important;
    min-height:44px!important;
    justify-content:center!important;
    padding:0!important;
    gap:0!important;
  }
  #meterView .meter-card[data-estimated="true"] .meter-value {
    font-size:clamp(26px,var(--meter-value-size,38px),52px)!important;
    min-height:1.05em!important;
    line-height:1.05!important;
    font-variant-numeric:tabular-nums!important;
  }
  #meterView .meter-card[data-estimated="true"] .meter-unit {
    margin-top:1px!important;
    line-height:1.1!important;
    font-size:13px!important;
  }
  #meterView .meter-card[data-estimated="true"] .meter-card-foot {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px!important;
    min-height:28px!important;
    line-height:1.12!important;
  }
  #meterView .meter-card[data-estimated="true"] .meter-samples {
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    font-size:10px!important;
    line-height:1.12!important;
  }
}
/* Other Location Google/Leaflet picker: confine all tile canvases to the
   actual mobile viewport. Google Maps absolute overlay requires this map
   container as its positioned containing block. */
.meter-location-dialog {
  max-width:calc(100dvw - 20px)!important;
  overflow-x:hidden!important;
}
.meter-location-dialog .meter-location-map {
  box-sizing:border-box!important;
  position:relative!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
  isolation:isolate;
}
.meter-location-dialog .meter-location-map > div,
.meter-location-dialog .meter-location-map .leaflet-container,
.meter-location-dialog .meter-location-map .gm-style {
  box-sizing:border-box!important;
  max-width:100%!important;
}
@media (max-width:650px) {
  .meter-location-dialog[open] {
    box-sizing:border-box!important;
    position:fixed!important;
    inset:0!important;
    margin:auto!important;
    width:calc(100dvw - 16px)!important;
    max-width:calc(100dvw - 16px)!important;
    height:auto!important;
    max-height:calc(100dvh - 22px)!important;
    padding:12px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }
  .meter-location-dialog .meter-location-map {
    height:clamp(220px,44dvh,440px)!important;
    min-height:220px!important;
    max-height:44dvh!important;
    margin-top:8px!important;
  }
  .meter-location-dialog .meter-location-search {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
  }
  .meter-location-dialog .meter-location-search input {
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
  }
  .meter-location-dialog .meter-location-search button {
    min-width:34px!important;
    padding:7px 9px!important;
  }
}

/* METER-IPHONE-EDGE-TO-EDGE-20261115
   Prevent Safari's post-search viewport zoom/scroll from making the native
   Meter wider than the physical phone. Keep its 2x2 instruments and
   calculations intact. Only the classic Meter + its dialogs are targeted. */
@media screen and (max-width: 700px) {
  html:has(#meterView[open]),body:has(#meterView[open]) {
    box-sizing:border-box!important;
    inline-size:100%!important;
    max-inline-size:100%!important;
    min-inline-size:0!important;
    overflow-x:clip!important;
    overscroll-behavior-x:none!important;
  }
  #meterView[open] {
    box-sizing:border-box!important;
    position:fixed!important;
    inset:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    inline-size:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding-left:max(8px,env(safe-area-inset-left,0px))!important;
    padding-right:max(8px,env(safe-area-inset-right,0px))!important;
    overflow-x:hidden!important;
    /* Retain horizontal gestures for native Street View and AR controls. */
    align-items:stretch!important;
  }
  #meterView[open] > :not(.meter-scene) {
    box-sizing:border-box!important;
    max-width:100%!important;
    min-width:0!important;
  }
  #meterView #meterGrid,#meterView.meter-immersive #meterGrid,
  #meterView.meter-focus-mode #meterGrid {
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    column-gap:7px!important;
    overflow:visible!important;
  }
  #meterView #meterGrid > .meter-card {
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
    width:100%!important;
    overflow:hidden!important;
    padding-inline:8px!important;
  }
  #meterView .meter-card-head,
  #meterView .meter-card-head > div,
  #meterView .meter-instrument,
  #meterView .meter-value-wrap,
  #meterView .meter-card-foot {
    min-width:0!important;
    max-width:100%!important;
  }
  #meterView .meter-switches,
  #meterView .meter-toolbar,
  #meterView .meter-selected-tags,
  #meterView .meter-top,
  #meterView .meter-pages,
  #meterView .meter-distance-control{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  #meterView .meter-switches {
    flex-wrap:wrap!important;
    justify-content:center!important;
    overflow-x:hidden!important;
  }
  #meterView .meter-switches > *{
    min-width:0!important;
    max-width:100%!important;
  }
  #meterView .meter-pages{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  #meterView .meter-pages button{
    min-width:0!important;width:100%!important;
    overflow:hidden!important;text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  /* Period/unit/currency are native select controls. iOS may auto-zoom
     those as well when their computed font size is below 16px. */
  #meterView select,
  #meterFilters select,
  .meter-location-dialog select {
    font-size:16px!important;
    min-width:0!important;
    max-width:100%!important;
    -webkit-text-size-adjust:100%!important;
  }
  #meterView .meter-switches select{
    padding-inline:5px!important;
  }
  /* iOS auto-zooms inputs below 16px, leaving the whole iframe magnified
     after the user closes Choose Location or the advanced filter editor. */
  .meter-location-dialog :is(input,textarea),
  #meterFilters :is(input,textarea) {
    font-size:16px!important;
    line-height:1.25!important;
    min-height:42px!important;
  }
}

/* METER-PICKER-VISUAL-VIEWPORT-FIT
   The selected-location Map / Satellite dialog must fit the *visible*
   Safari window even when the surrounding workspace is magnified.
   Keep the existing Google/Leaflet picker and its GPS interactions. */
.meter-location-dialog[open] {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:8px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin;
}
.meter-location-dialog .meter-location-search{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:7px!important;
  align-items:center!important;
  margin:0!important;
  width:100%!important;
  min-width:0!important;
}
.meter-location-dialog .meter-location-search input{
  box-sizing:border-box!important;
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  font-size:16px!important;
  line-height:1.25!important;
  height:42px!important;
  text-overflow:ellipsis;
}
.meter-location-dialog .meter-location-search button{
  flex:0 0 auto!important;
  min-width:35px!important;
  min-height:42px!important;
  max-width:90px!important;
  padding:7px 10px!important;
  white-space:nowrap!important;
  font-size:14px!important;
}
.meter-location-dialog .meter-location-layers{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:7px!important;
}
.meter-location-dialog .meter-location-results{
  width:100%!important;
  max-height:80px!important;
  min-width:0!important;
  flex:0 1 auto!important;
}
.meter-location-dialog .meter-location-map{
  box-sizing:border-box!important;
  position:relative!important;
  display:block!important;
  flex:1 1 180px!important;
  min-height:180px!important;
  height:clamp(180px,36dvh,360px)!important;
  max-height:min(43dvh,360px)!important;
  max-width:100%!important;
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  overflow:hidden!important;
}
.meter-location-dialog p[role=status]{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  max-width:100%!important;
  margin:0!important;
  overflow-wrap:anywhere!important;
  font-size:13px!important;
}
.meter-location-dialog [data-use]{
  box-sizing:border-box!important;
  display:block!important;
  position:sticky!important;
  bottom:0!important;
  z-index:25!important;
  align-self:stretch!important;
  width:100%!important;
  min-height:45px!important;
  flex:0 0 auto!important;
  border-radius:11px!important;
  font-size:15px!important;
  margin:0!important;
  white-space:normal!important;
}
@media (max-width:700px){
  .meter-location-dialog[open]{
    max-width:calc(100dvw - 12px)!important;
    width:calc(100dvw - 12px)!important;
    max-height:calc(100dvh - 14px)!important;
    padding:11px!important;
    border-radius:15px!important;
  }
  .meter-location-dialog .meter-location-map{
    height:clamp(175px,37dvh,345px)!important;
    min-height:175px!important;
    max-height:40dvh!important;
  }
}
