/* ==========================================================================
   FarmTab site scale (see inc/site-scale.php for on/off and removal)
   Desktop with a mouse only: whole page drawn at --ft-scale (default 90%).
   ========================================================================== */

:root { --ft-scale: .9; } /* real value is printed inline from PHP */

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {

  html:has(> body.ft-scale) { zoom: var(--ft-scale); }

  /* Under zoom, vh/dvh shrink too (100vh would be 90% of the screen).
     Dividing by the scale keeps these full-screen pieces full-screen. */
  html body.ft-scale .farmtab-quickview-panel {
    max-height: calc(100vh / var(--ft-scale) - 32px);
    max-height: calc(100dvh / var(--ft-scale) - 32px);
  }
  html body.ft-scale .farmtab-modal-content { max-height: calc(90vh / var(--ft-scale)); }
  html body.ft-scale .ftmn-auth__card {
    max-height: calc(100vh / var(--ft-scale) - 40px);
    max-height: calc(100dvh / var(--ft-scale) - 40px);
  }
  html body.ft-scale .csa-form-main      { min-height: calc(60vh / var(--ft-scale)); }
  html body.ft-scale .ftdash-login       { min-height: calc(70vh / var(--ft-scale)); }
  html body.ft-scale .ftdash-modal__panel { max-height: calc(90vh / var(--ft-scale)); }

  /* Store Manager / My Account shell (farmtab-child dashboard.css) */
  html body.ft-scale .ftdash,
  html body.ft-scale .ftdash-main {
    min-height: calc(100vh / var(--ft-scale));
    min-height: calc(100dvh / var(--ft-scale));
  }
  html body.ft-scale .ftdash-sidebar {
    height: calc(100vh / var(--ft-scale) - var(--wp-admin--admin-bar--height, 0px));
    height: calc(100dvh / var(--ft-scale) - var(--wp-admin--admin-bar--height, 0px));
  }
}

/* Homepage hero uses 50vh between 1024 and 1250px (front-page.css) */
@media (min-width: 1024px) and (max-width: 1250px) and (hover: hover) and (pointer: fine) {
  html body.ft-scale .hero-video-section { height: calc(50vh / var(--ft-scale)); }
}
