/* Mzee Health PWA — install banners, updates, standalone chrome */

.pwa-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1080;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #0A0936;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(10, 9, 54, 0.35);
}

.pwa-banner[hidden] {
  display: none !important;
}

.pwa-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  background: #000;
}

.pwa-banner-copy {
  flex: 1;
  min-width: 0;
}

.pwa-banner-copy strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.pwa-banner-copy span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pwa-banner .pwa-btn {
  border: none;
  background: #6DF7E5;
  color: #0A0936;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.pwa-banner .pwa-btn:hover {
  filter: brightness(1.05);
}

.pwa-banner .pwa-dismiss {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
}

.pwa-banner .pwa-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pwa-banner.pwa-update {
  bottom: auto;
  top: 12px;
  background: #1B365D;
}

.pwa-ios-hint .pwa-banner-copy span i {
  color: #6DF7E5;
}

html.pwa-standalone {
  height: 100%;
}

html.pwa-standalone body {
  min-height: 100dvh;
  overscroll-behavior: none;
}

html.pwa-standalone #sidebar {
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

html.pwa-standalone .navbar-top {
  padding-top: env(safe-area-inset-top);
  height: calc(var(--topbar-height) + env(safe-area-inset-top, 0px));
}

html.pwa-standalone .app-footer {
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

html.pwa-standalone .fab {
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

html.pwa-standalone .pwa-banner {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

html.pwa-standalone .pwa-banner.pwa-update {
  top: calc(12px + env(safe-area-inset-top, 0px));
  bottom: auto;
}

@media (display-mode: standalone), (display-mode: minimal-ui) {
  html {
    height: 100%;
  }
}

.pwa-offline {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  background: #0A0936;
  color: #fff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pwa-offline-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.pwa-offline-card img {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.pwa-offline-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.pwa-offline-card p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.pwa-offline-card .pwa-btn {
  display: inline-block;
  border: none;
  background: #6DF7E5;
  color: #0A0936;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  padding: 0.65rem 1.25rem;
  text-decoration: none;
  cursor: pointer;
}
