/* Chycas 3.12.3 - scorrimento PWA e browser mobile.
   Scorrimento verticale unico della pagina; menu navigazione aperto escluso;
   lo scorrimento orizzontale delle tabelle resta indipendente. */
@media (display-mode: standalone), (max-width: 1180px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: auto !important;
    touch-action: auto !important;
  }
  body.cyc-app-portal:not(.cyc-menu-open) {
    position: static !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body.cyc-app-portal .cyc-suite,
  body.cyc-property-portal-active .cyc-suite-operator {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: start !important;
  }
  body.cyc-app-portal .cyc-suite .cyc-suite-main,
  body.cyc-property-portal-active .cyc-suite-operator .cyc-suite-main {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior-y: auto !important;
    touch-action: auto !important;
  }
  body.cyc-app-portal .cyc-suite .cyc-embedded-admin-shell {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
  body.cyc-app-portal .cyc-suite .cyc-suite-side {
    height: auto !important;
    max-height: none !important;
    overscroll-behavior-y: auto !important;
  }
  body.cyc-app-portal .cyc-suite .cyc-suite-scroll,
  body.cyc-app-portal .cyc-suite .cyc-responsive-table,
  body.cyc-app-portal .cyc-suite .cyc-admin-embedded .cyc-panel {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
}
@media (display-mode: standalone) and (min-width: 1181px) {
  body.cyc-property-portal-active .cyc-suite-operator .cyc-suite-side {
    position: sticky !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    height: auto !important;
    max-height: calc(100dvh - 32px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 1180px) {
  body.cyc-app-portal .cyc-suite .cyc-suite-side {
    position: relative !important;
    top: auto !important;
    overflow: visible !important;
  }
}

/* Menu mobile aperto: blocca il fondo, ma permette lo scroll del menu.
   La vecchia regola del tema impostava touch-action:none sul body. */
@media (max-width: 1180px) {
  body.cyc-app-portal.cyc-menu-open {
    touch-action: auto !important;
  }
  body.cyc-app-portal.cyc-menu-open .cyc-menu {
    touch-action: pan-y !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
