/* Guardian Parking Portal PWA shell — Version 2.12.3 */
:root {
  --pwa-safe-top: env(safe-area-inset-top, 0px);
  --pwa-safe-right: env(safe-area-inset-right, 0px);
  --pwa-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pwa-safe-left: env(safe-area-inset-left, 0px);
}

#pwa-install-host {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--pwa-safe-bottom));
  z-index: 155;
  width: min(520px, calc(100vw - 28px - var(--pwa-safe-left) - var(--pwa-safe-right)));
  transform: translateX(-50%);
  pointer-events: none;
}

.pwa-install-card,
.pwa-update-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 46px 13px 13px;
  color: #151719;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .20);
  pointer-events: auto;
  animation: pwa-card-in .22s ease-out;
}

.pwa-update-card { border-color: #cfe2f8; }

.pwa-install-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}

.pwa-install-card__copy { min-width: 0; }
.pwa-install-card__copy strong {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.25;
}
.pwa-install-card__copy span {
  display: block;
  color: #69717b;
  font-size: 11px;
  line-height: 1.45;
}

.pwa-install-card__action {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #151719;
  border-radius: 9px;
  color: #fff;
  background: #151719;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.pwa-install-card__action:hover { background: #292d31; }

.pwa-install-card__dismiss {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #69717b;
  background: transparent;
  font: inherit;
  font-size: 21px;
  line-height: 1;
}
.pwa-install-card__dismiss:hover { color: #151719; background: #eef0f2; }

#pwa-network-status {
  position: fixed;
  top: calc(8px + var(--pwa-safe-top));
  left: 50%;
  z-index: 210;
  width: min(560px, calc(100vw - 28px - var(--pwa-safe-left) - var(--pwa-safe-right)));
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid #f0dda9;
  border-radius: 10px;
  color: #775111;
  background: #fff8e8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

@keyframes pwa-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (display-mode: standalone) {
  html, body { overscroll-behavior-y: none; }
  body { min-height: 100dvh; }
  .auth-panel {
    padding-top: calc(28px + var(--pwa-safe-top));
    padding-right: calc(20px + var(--pwa-safe-right));
    padding-bottom: calc(50px + var(--pwa-safe-bottom));
    padding-left: calc(20px + var(--pwa-safe-left));
  }
  .sidebar {
    padding-top: var(--pwa-safe-top);
    padding-bottom: var(--pwa-safe-bottom);
  }
  .topbar {
    top: 0;
    height: calc(var(--header-height) + var(--pwa-safe-top));
    padding-top: var(--pwa-safe-top);
    padding-right: calc(clamp(20px, 3vw, 38px) + var(--pwa-safe-right));
    padding-left: calc(clamp(20px, 3vw, 38px) + var(--pwa-safe-left));
  }
  .content {
    padding-right: calc(clamp(20px, 3vw, 42px) + var(--pwa-safe-right));
    padding-bottom: calc(60px + var(--pwa-safe-bottom));
    padding-left: calc(clamp(20px, 3vw, 42px) + var(--pwa-safe-left));
  }
  .drawer { padding-top: var(--pwa-safe-top); padding-bottom: var(--pwa-safe-bottom); }
  .modal-backdrop { padding-bottom: var(--pwa-safe-bottom); }
}

@media (max-width: 680px) {
  .pwa-install-card,
  .pwa-update-card {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 12px 40px 12px 12px;
  }
  .pwa-install-card__icon { width: 42px; height: 42px; border-radius: 10px; }
  .pwa-install-card__action { grid-column: 1 / -1; width: 100%; }
  @media (display-mode: standalone) {
    .topbar {
      padding-right: calc(13px + var(--pwa-safe-right));
      padding-left: calc(13px + var(--pwa-safe-left));
    }
    .content {
      padding-right: calc(14px + var(--pwa-safe-right));
      padding-bottom: calc(45px + var(--pwa-safe-bottom));
      padding-left: calc(14px + var(--pwa-safe-left));
    }
  }
}

@media print {
  #pwa-install-host,
  #pwa-network-status { display: none !important; }
}
