/* Prevent iOS zoom on input focus */
@media screen and (max-width: 768px) {
  input:not([type="button"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Scale down on low-resolution laptop screens (up to 1440x900) */
@media screen and (min-width: 769px) and (max-width: 1440px) and (max-height: 900px) {
  body {
    zoom: 0.8;
  }

  /* Compensate vh/vw for zoom so full-screen elements fill the visible area.
     With zoom 0.8 the visible viewport is 1/0.8 = 125% of a CSS vh unit. */

  /* Login page */
  .enhanced-layout-container {
    min-height: calc(100vh / 0.8) !important;
  }

  /* Register landing page */
  #landing-register-content main {
    min-height: calc(100vh / 0.8) !important;
  }

  #landing-register-content .landing-container {
    min-height: calc(100vh / 0.8 - 80px) !important;
  }

  /* Programs sidebar (fixed, needs full visible height) */
  .program-sidebar-container {
    height: calc(100vh / 0.8) !important;
  }

  /* Dashboard layout: body zoom already handles scaling,
     avoid double zoom from DashboardLayoutV2 */
  .plv2-layout__content {
    zoom: 1 !important;
  }

  /* Dashboard trainer: ensure it fills the zoomed viewport.
     100vw = physical 1366px but visible area is 1366/0.8 ≈ 1708px,
     so max-width: 100vw clips the right side. */
  .pl-td {
    min-height: calc(100vh / 0.8) !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* Dashboard layout wrapper also needs full width */
  .plv2-layout {
    min-height: calc(100vh / 0.8);
  }

  /* Modal overlays that use explicit 100vh */
  .app-registration-help-modal-overlay {
    width: calc(100vw / 0.8) !important;
    height: calc(100vh / 0.8) !important;
  }

  /* Sidebar overlay */
  .program-sidebar-overlay {
    width: calc(100vw / 0.8) !important;
    height: calc(100vh / 0.8) !important;
  }
}
