/* v263r1 — next step, mobile map disclosure and GPS state. */
html.va-clarity-ready #familyNextStep[hidden]{display:none!important}
html.va-clarity-ready #screen-house.nav-hub-root #familyNextStep:not([hidden]){
  display:grid;gap:8px;margin:12px 0 4px;padding:14px;
  border:1px solid #edb060;border-radius:15px;background:#443424;
  box-shadow:0 5px 17px rgba(0,0,0,.22);color:#fff4e5;
}
html.va-clarity-ready #screen-house.nav-hub-root #familyNextStep.family-next-ready{
  padding:12px 14px;border-color:#6ebf91;background:#183e32;color:#ecfff3;
}
html.va-clarity-ready #familyNextStep .family-next-badge{
  justify-self:start;padding:4px 9px;border-radius:999px;
  color:#ffdfae;background:rgba(255,186,99,.12);
  border:1px solid rgba(255,186,99,.4);
  font:850 .73rem/1.25 system-ui,sans-serif;
}
html.va-clarity-ready #familyNextStep.family-next-ready .family-next-badge{
  background:#26573f;color:#ccffe0;border-color:#68c68f;
}
html.va-clarity-ready #familyNextStep>strong{font-size:1.08rem;line-height:1.3;}
html.va-clarity-ready #familyNextStep>p{
  margin:0;color:#e7d6be;font-size:.84rem;line-height:1.42;
}
html.va-clarity-ready #familyNextStep.family-next-ready>p{color:#c9edda;}
html.va-clarity-ready #familyNextStep>button{
  min-height:47px;width:100%;padding:10px 13px;
  border:2px solid #ffcd84;border-radius:11px;
  background:#f5a12b;color:#142537;
  font:900 .91rem/1.25 system-ui,sans-serif;cursor:pointer;
}
html.va-clarity-ready #familyNextStep.family-next-ready>button{
  background:#285743;color:#f4fff8;border:1px solid #83d6a9;
}
html.va-clarity-ready #familyNextStep>button:focus-visible{
  outline:3px solid #ffdd98;outline-offset:2px;
}
html.va-clarity-ready #screen-house.nav-hub-root.family-next-position #familyCandyQuickPanel{
  display:none!important;
}
html.va-clarity-ready #screen-house.nav-hub-root #familyNextStep:not([hidden]) + #familyCandyQuickPanel{
  margin-top:8px;
}
/* Retain existing separated filter and Mapa/Satélite controls and their click handlers. */
@media(max-width:720px){
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud{
    box-sizing:border-box!important;display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    left:8px!important;right:8px!important;width:auto!important;
    max-width:none!important;top:62px!important;
    padding:0!important;gap:0!important;pointer-events:none!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudDetails{
    display:block;width:100%;min-width:0;max-width:100%;
    box-sizing:border-box;pointer-events:auto;
    border:1px solid rgba(255,184,99,.52);
    border-radius:12px;background:rgba(11,27,40,.96);
    color:#f7f9fc;box-shadow:0 5px 16px rgba(0,0,0,.36);
  }
  html.va-clarity-ready #mapHudDetails > summary{
    box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;
    align-items:center;gap:3px 9px;min-height:50px;padding:8px 12px;
    cursor:pointer;list-style:none;touch-action:manipulation;
  }
  html.va-clarity-ready #mapHudDetails > summary::-webkit-details-marker{display:none;}
  html.va-clarity-ready #mapHudDetails > summary:focus-visible{
    outline:3px solid #ffc679;outline-offset:2px;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-head{
    grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;
    gap:8px;color:#ffcc88;font:900 .79rem/1.22 system-ui,sans-serif;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-family{
    min-width:0;grid-column:1;display:block;
    color:#f1f7fc;font:.76rem/1.28 system-ui,sans-serif;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-family b{
    font-weight:850;overflow-wrap:anywhere;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-hint{
    grid-column:2;grid-row:2;text-align:right;
    font:750 .65rem/1.3 system-ui,sans-serif;color:#c3d3e2;
  }
  html.va-clarity-ready #mapHudDetails[open] .map-hud-summary-chevron{
    transform:rotate(180deg);
  }
  html.va-clarity-ready #mapHudDetails:not([open]) > #mapHudFull{display:none!important;}
  html.va-clarity-ready #mapHudFull{
    display:grid;grid-template-columns:minmax(0,1fr);gap:6px;
    padding:0 8px 8px;max-height:38dvh;overflow-y:auto;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .distribution-group{
    box-sizing:border-box!important;display:block!important;
    min-width:0!important;width:100%!important;
    padding:9px 11px!important;border-radius:10px!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .distribution-title{
    font-size:.7rem!important;line-height:1.25!important;
    white-space:normal!important;margin:0 0 6px!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .distribution-values b{
    font-size:.94rem!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .distribution-values em{
    font-size:.64rem!important;white-space:normal!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .event-distribution-values strong{
    font-size:.84rem!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .event-distribution-values em{
    font-size:.72rem!important;white-space:normal!important;
  }
  html.va-clarity-ready .app.map-screen-active #screen-map .map-distribution-hud #mapHudFull .distribution-values img{
    width:24px!important;height:24px!important;
  }
  html.va-clarity-ready #mapHudFull .map-metric-help{
    margin:2px 0 0;padding:9px 10px;border-radius:9px;
    background:#203749;color:#d5e0ea;font-size:.73rem;line-height:1.4;
  }
}
@media(min-width:721px){
  html.va-clarity-ready #mapHudDetails,
  html.va-clarity-ready #mapHudFull{display:contents!important;}
  html.va-clarity-ready #mapHudDetails>summary,
  html.va-clarity-ready #mapHudFull>.map-metric-help{display:none!important;}
}
/* Active/paused status in the existing GPS shortcut, not a second control. */
body > #quickActionMenu [hidden]{display:none!important;}
body > #quickActionMenu .quick-action-secondary button[data-quick-action="track"]{
  position:relative;
}
body > #quickActionMenu .quick-action-track-badge:not([hidden]){
  position:absolute;top:6px;right:6px;display:inline-flex;
  padding:3px 6px;border-radius:999px;background:#267749;
  border:1px solid #8bdbab;color:#effff5;
  font:900 .65rem/1.2 system-ui,sans-serif;
}
body > #quickActionMenu .tracking-paused .quick-action-track-badge:not([hidden]){
  background:#72552b;border-color:#efd08a;color:#fff2d8;
}

/* v265r1 — feedback persistente do upload, separado da galeria. */
#housePhotoUploadFeedback[hidden]{display:none!important}
.house-photo-upload-feedback{box-sizing:border-box;margin:10px 0;padding:10px 12px;
  border:1px solid #93aec6;border-radius:10px;background:#193449;color:#f0f6fc;
  font-size:.82rem;font-weight:750;line-height:1.4;overflow-wrap:anywhere}
.house-photo-upload-feedback[data-state="error"]{border-color:#ffad7d;background:#493023;color:#ffe6d2}
.house-photo-upload-feedback[data-state="success"]{border-color:#7bd4a3;background:#173e30;color:#d5ffe6}
.house-photo-upload-feedback[data-state="sending"]{border-color:#ffc979;background:#493a21;color:#fff1ce}

/* v266r1 — botão explícito de upload da casa, independente de endereço/GPS. */
#screen-house #uploadHousePhotosBtn[hidden]{display:none!important}
#screen-house #uploadHousePhotosBtn{
  display:block;box-sizing:border-box;min-height:48px;width:100%;
  margin:9px 0 12px;padding:10px 13px;
  border:2px solid #ffc475;border-radius:11px;
  background:linear-gradient(160deg,#ffbb5c,#ed9024);
  color:#112337;font:900 .92rem/1.3 system-ui,sans-serif;
  white-space:normal;overflow-wrap:anywhere;
}
#screen-house #uploadHousePhotosBtn:disabled{opacity:.7;cursor:wait}
#screen-house #uploadHousePhotosBtn:focus-visible{outline:3px solid #ffdfa0;outline-offset:2px}


/* v267r1 — o resumo deixa de flutuar sobre o mapa. No celular,
   toolbar / HUD / mapa / legenda são linhas reais do grid. Não usar top fixo. */
@media(max-width:720px){
  html.va-clarity-ready .app.map-screen-active > #screen-map.active{
    grid-template-rows:auto auto minmax(0,1fr) auto!important;
    row-gap:0!important;
  }
  html.va-clarity-ready .app.map-screen-active > #screen-map.active > .map-toolbar{
    grid-row:1!important;
  }
  html.va-clarity-ready .app.map-screen-active > #screen-map.active > .map-distribution-hud{
    box-sizing:border-box!important;
    grid-row:2!important;
    position:relative!important;inset:auto!important;top:auto!important;
    left:auto!important;right:auto!important;bottom:auto!important;
    transform:none!important;
    display:block!important;min-height:0!important;height:auto!important;
    width:100%!important;max-width:none!important;
    margin:0!important;padding:4px 7px 5px!important;
    background:#0a1d2c!important;border:0!important;
    border-bottom:1px solid rgba(255,255,255,.16)!important;
    border-radius:0!important;box-shadow:none!important;
    overflow:visible!important;pointer-events:auto!important;
    z-index:701!important;
  }
  html.va-clarity-ready .app.map-screen-active > #screen-map.active > .map-wrap{
    grid-row:3!important;min-height:0!important;
  }
  html.va-clarity-ready .app.map-screen-active > #screen-map.active > .map-legend-strip{
    grid-row:4!important;
  }
  html.va-clarity-ready .app.map-screen-active > #screen-map.active > .map-distribution-hud #mapHudDetails{
    width:100%!important;min-width:0!important;max-width:100%!important;
    border:1px solid rgba(255,184,99,.42)!important;
    border-radius:10px!important;background:#132a3c!important;
    box-shadow:none!important;
  }
  html.va-clarity-ready .app.map-screen-active > #screen-map.active > .map-distribution-hud #mapHudDetails>summary{
    box-sizing:border-box!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;align-items:center!important;
    min-height:43px!important;height:auto!important;
    row-gap:2px!important;column-gap:8px!important;
    padding:5px 9px!important;margin:0!important;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-head{
    grid-column:1!important;grid-row:1!important;
    justify-content:flex-start!important;font-size:.75rem!important;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-family{
    grid-column:1/-1!important;grid-row:2!important;
    font-size:.69rem!important;line-height:1.22!important;
  }
  html.va-clarity-ready #mapHudDetails .map-hud-summary-hint{
    grid-column:2!important;grid-row:1!important;
    align-self:center!important;white-space:nowrap!important;
    font-size:.69rem!important;color:#ffce89!important;
  }
  html.va-clarity-ready #mapHudFull{
    max-height:min(38dvh,250px)!important;
    overflow-y:auto!important;overscroll-behavior:contain;
  }
  html.va-clarity-ready #mapHudDetails[open] #mapHudFull{
    padding-top:6px!important;
  }
}
@media(max-width:720px) and (max-height:680px){
  html.va-clarity-ready #mapHudFull{max-height:min(32dvh,200px)!important}
}
