/* PWA install prompt bar */
.avenza-pwa-install-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.97);
  border-top: 1px solid rgba(34, 211, 238, 0.25);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  color: #cbd5e1;
}
.avenza-pwa-install-bar[hidden] {
  display: none !important;
}
.avenza-pwa-install-msg {
  flex: 1 1 200px;
  min-width: 0;
  line-height: 1.45;
}
.avenza-pwa-install-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #0f172a;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.avenza-pwa-install-dismiss {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.avenza-pwa-install-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.avenza-pwa-toast-root {
  position: fixed;
  left: 50%;
  bottom: max(88px, calc(16px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 99999;
  pointer-events: none;
  width: min(92vw, 420px);
}

.avenza-pwa-toast {
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.avenza-pwa-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.avenza-pwa-toast--success {
  border-color: rgba(74, 222, 128, 0.45);
}

/* Shared preview / app navigation strip */
.preview-app-nav {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(13, 20, 36, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  z-index: 48;
}
.preview-app-nav.show {
  display: flex;
  position: sticky;
  top: 58px;
}
.preview-app-nav a,
.preview-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: #22d3ee;
  text-decoration: none;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.07);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.preview-app-nav a:hover,
.preview-nav-link:hover {
  color: #f8fafc;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
}
