/* MShowTV V17.6.10
   Public vertical scroll repair.
   This file intentionally loads last and overrides older height/overflow rules. */

html {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth;
}

body {
  position: relative !important;
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y !important;
}

main {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

main > .page-section {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

main > .page-section.active-section {
  height: auto !important;
  min-height: calc(100vh - 90px) !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Home remains a flex section but can grow beyond the first screen. */
main > #inicio.page-section.active-section {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  flex-wrap: wrap !important;
}

/* News and other long panels must expand naturally. */
#noticias,
#clima,
#trafico,
#reality,
#envivo,
#participar,
#contrataciones,
#comunidad,
#compras {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Prevent large cards/media from creating an inner locked viewport. */
.news-shell-v1764,
.news-card-v1764,
.news-list-v1764,
.public-panel,
.panel,
.section-inner,
.content-wrap {
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
}

/* Preserve horizontal carousels while allowing the page to scroll vertically. */
.news-media-carousel-v1764,
.mshow-top-notice-track-v1762 {
  touch-action: pan-x pan-y !important;
}

/* Desktop mouse wheel / touchpad compatibility */
@media (min-width: 761px) {
  html, body {
    overflow-y: scroll !important;
  }
}

/* iPhone/iPad vertical gesture compatibility */
@media (max-width: 760px) {
  html, body {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto !important;
  }
}
