/*
 * GARCÍA CANDO · REAL ESTATE R5.21
 * Ajuste puntual de vista mapa:
 * - baja controles internos en escritorio horizontal;
 * - elimina el fade/CTA inferior compartido solo en ?view=mapa;
 * - refuerza mapa inmersivo a viewport completo;
 * - conserva intacta la burbuja/menu numerado R5.20.
 */

/* Ruta mapa: sin CTA/fade compartido en la parte inferior. */
html.gc521-map-route body.gc410-page .gc503-share-home{
  display:none!important;
  padding:0!important;
  margin:0!important;
  min-height:0!important;
  background:none!important;
}
html.gc521-map-route body.gc410-page .gc503-site-bottom{
  background:#040505!important;
}

/* En inmersivo el mapa ocupa exactamente el viewport disponible. */
html.gc521-map-route body.re-map-immersive.gc410-page,
html.gc521-map-route body.re-map-immersive.gc410-page #reMain{
  width:100%!important;
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
}
html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap{
  position:fixed!important;
  inset:0!important;
  width:100dvw!important;
  height:100dvh!important;
  min-width:100dvw!important;
  min-height:100dvh!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
}
html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap>#reMap,
html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap>.re-map{
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  border-radius:0!important;
}
html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap::before{
  display:none!important;
  content:none!important;
}

/* Escritorio horizontal: los controles estaban demasiado pegados al borde superior. */
@media (orientation:landscape) and (min-width:801px){
  html.gc521-map-route body.re-map-focus.gc410-page .re-map-wrap>.re-map-controls-r430,
  html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap>.re-map-controls-r430{
    top:88px!important;
    left:18px!important;
    right:auto!important;
    width:auto!important;
    max-width:calc(100vw - 390px)!important;
    z-index:2460!important;
  }
  html.gc521-map-route body.re-map-focus.gc410-page .re-map-wrap>.re-map-controls-r430 .re-map-control-row,
  html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap>.re-map-controls-r430 .re-map-control-row{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:7px!important;
  }
  html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap .leaflet-control-zoom{
    margin-top:176px!important;
  }
}

/* Vertical: conserva composición compacta y deja todos los controles dentro del viewport. */
@media (orientation:portrait), (max-width:800px){
  html.gc521-map-route body.re-map-focus.gc410-page .re-map-wrap>.re-map-controls-r430,
  html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap>.re-map-controls-r430{
    left:8px!important;
    right:8px!important;
    max-width:calc(100vw - 16px)!important;
    z-index:2460!important;
  }
  html.gc521-map-route body.re-map-focus.gc410-page .re-map-wrap>.re-map-controls-r430 .re-map-control-row,
  html.gc521-map-route body.re-map-immersive.gc410-page .re-map-wrap>.re-map-controls-r430 .re-map-control-row{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
  }
}
