/**
 * PWA install + push banners — loaded on login and in-app (no Tailwind required).
 */
.pwa-banner[hidden],
.pwa-banner.hidden,
.pwa-help[hidden],
.pwa-help.hidden {
  display: none !important;
}

.pwa-banner {
  position: fixed;
  z-index: 50;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  width: auto;
  max-width: 26rem;
  margin: 0 auto;
  padding: 1rem 1rem 1.125rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(16, 42, 74, 0.18);
  box-sizing: border-box;
}

.pwa-banner--push {
  z-index: 55;
}

.pwa-banner__row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.pwa-banner__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #f8fafc;
}

.pwa-banner__icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: #f0f9ff;
  color: #1c2a4a;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.pwa-banner__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: #1c2a4a;
  line-height: 1.3;
}

.pwa-banner__text {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #475569;
}

.pwa-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pwa-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}

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

.pwa-btn-primary {
  background: #1c2a4a;
  color: #fff;
}

.pwa-btn-secondary {
  background: #f8fafc;
  color: #1e293b;
  border-color: #e2e8f0;
}

.pwa-btn-ghost {
  background: transparent;
  color: #64748b;
}

.pwa-help {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.5);
  box-sizing: border-box;
}

.pwa-help__panel {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
  box-sizing: border-box;
}

.pwa-help__panel h2 {
  margin: 0;
  font-size: 1rem;
  color: #1c2a4a;
}

.pwa-help__panel ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.pwa-help__panel p,
.pwa-help__panel li {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #334155;
}

.pwa-help__close {
  width: 100%;
  margin-top: 1rem;
  min-height: 44px;
}

@media (min-width: 640px) {
  .pwa-help {
    align-items: center;
  }
}

@media (min-width: 768px) {
  .pwa-banner {
    left: auto;
    right: 1.25rem;
    width: 24rem;
  }
}

.login-page.has-pwa-banner {
  padding-bottom: 9rem;
}
