/* Mobile comfort updates for the Parent PWA. */
html {
  min-height: 100%;
  background: #edf3fb;
  -webkit-text-size-adjust: 100%;
}

body,
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  overscroll-behavior-y: contain;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
}

.staff-mode #homeView {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.staff-mode #moduleView {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

.staff-mode .topbar {
  position: sticky;
  top: 0;
  z-index: 12;
}

.staff-bottom-nav {
  bottom: calc(10px + env(safe-area-inset-bottom));
  padding: 8px 5px;
}

.staff-bottom-nav button {
  min-height: 48px;
}

.module-items {
  min-width: 0;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.module-item,
.child-card,
.staff-module,
.guardian-module-card {
  min-width: 0;
}

.module-item h2,
.module-item p,
.child-info h2,
.child-info p {
  overflow-wrap: anywhere;
}

.pwa-dialog {
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pwa-dialog header {
  position: sticky;
  top: 0;
  z-index: 1;
}

.pwa-dialog .dialog-close,
.member-result-actions button,
.finance-member-actions button {
  min-width: 44px;
  min-height: 44px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .staff-mode .children {
    gap: 9px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .staff-mode .staff-module {
    padding: 13px;
  }

  .staff-mode .staff-module .child-info h2 {
    font-size: 14px;
  }

  .staff-bottom-nav {
    width: calc(100% - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
