/**
 * PWA Add to Home Screen — tinggi penuh layar.
 * iOS standalone: innerHeight sering terlalu kecil (bug Safari).
 * Pakai 100lvh (= tinggi layar tanpa browser bar, sama seperti mode fullscreen).
 */

html.pwa-standalone,
html.pwa-standalone body {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  height: 100lvh;
  min-height: 100lvh;
  max-height: 100lvh;
  overflow: hidden;
  overscroll-behavior: none;
}

html.pwa-standalone .dash-wrapper {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  height: 100lvh;
  min-height: 100lvh;
  max-height: 100lvh;
  transform: none !important;
  /* Jarak dari status bar (jam, wifi, battery) */
  padding-top: max(30px, env(safe-area-inset-top, 0px)) !important;
}

html.pwa-standalone body::before {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100lvh;
}

html.pwa-standalone #btnFullscreen {
  display: none !important;
}

@media (display-mode: standalone) {
  html,
  body {
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
    height: 100lvh;
    min-height: 100lvh;
    max-height: 100lvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .dash-wrapper {
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
    height: 100lvh;
    min-height: 100lvh;
    max-height: 100lvh;
    transform: none !important;
    padding-top: max(30px, env(safe-area-inset-top, 0px)) !important;
  }

  #btnFullscreen {
    display: none !important;
  }
}
