:root {
  --ciite-safe-top: env(safe-area-inset-top, 0px);
  --ciite-safe-right: env(safe-area-inset-right, 0px);
  --ciite-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ciite-safe-left: env(safe-area-inset-left, 0px);
}

html.pwa-standalone {
  min-height: 100%;
  background: #f4fafb;
  overscroll-behavior-y: none;
}

html.pwa-standalone body.admin-ui,
html.pwa-standalone body.login-page {
  min-height: 100dvh;
  padding-top: var(--ciite-safe-top);
  padding-right: var(--ciite-safe-right);
  padding-bottom: var(--ciite-safe-bottom);
  padding-left: var(--ciite-safe-left);
  background: #f4fafb;
}

html.pwa-standalone body.admin-ui .app-shell {
  min-height: calc(100dvh - var(--ciite-safe-top) - var(--ciite-safe-bottom));
}

html.pwa-standalone body.admin-ui .sidebar {
  height: calc(100dvh - var(--ciite-safe-top) - var(--ciite-safe-bottom));
}

html.pwa-standalone body.login-page .login-shell {
  min-height: calc(100dvh - var(--ciite-safe-top) - var(--ciite-safe-bottom));
}

@media (display-mode: standalone) {
  a,
  button,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color: transparent;
  }
}
