/* ==========================================================================
   GeoProspect — PWA Persistent TopBar Banner & Installation Notice Styles
   ========================================================================== */

.pwa-topbar-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #0b111a;
  border-bottom: 1px solid var(--border-subtle, #1e293b);
  z-index: 1003;
  display: flex;
  align-items: center;
  font-family: var(--font-sans, sans-serif);
}

.pwa-banner-inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pwa-banner-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-primary, #f8fafc);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-banner-icon {
  width: 16px;
  height: 16px;
  color: var(--accent, #ea580c);
  flex-shrink: 0;
}

.pwa-banner-text-desktop { display: inline; }
.pwa-banner-text-mobile { display: none; }

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

.pwa-btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  background: var(--accent, #ea580c);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.pwa-btn-install:hover {
  background: var(--accent-hover, #f97316);
}

.pwa-btn-icon {
  width: 13px;
  height: 13px;
}

.pwa-btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary, #94a3b8);
  border-radius: 4px;
  cursor: pointer;
  transition: all 150ms ease;
}

.pwa-btn-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pwa-btn-close svg {
  width: 15px;
  height: 15px;
}

/* Landing Page Header Shift when Banner is Active */
body.has-pwa-banner {
  padding-top: 104px !important;
}

body.has-pwa-banner header.site-header {
  top: 40px !important;
}

body.has-pwa-banner .mobile-drawer {
  top: 104px !important;
  height: calc(100dvh - 104px) !important;
}

/* Custom Instruction Toast (Zero Native Alert) */
.pwa-notice-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  background: var(--bg-surface-elevated, #151d2c);
  border: 1px solid var(--border-hover, #334155);
  border-left: 3px solid var(--accent, #ea580c);
  border-radius: 6px;
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 10000;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.pwa-notice-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.pwa-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pwa-notice-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.pwa-notice-dismiss {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pwa-notice-msg {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.5;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pwa-topbar-banner {
    height: 42px;
  }
  .pwa-banner-inner {
    padding: 0 14px;
  }
  .pwa-banner-text-desktop { display: none; }
  .pwa-banner-text-mobile { display: inline; font-size: 12px; }
  body.has-pwa-banner {
    padding-top: 106px !important;
  }
  body.has-pwa-banner header.site-header {
    top: 42px !important;
  }
  body.has-pwa-banner .mobile-drawer {
    top: 106px !important;
    height: calc(100dvh - 106px) !important;
  }
  .pwa-notice-toast {
    left: 16px;
    right: 16px;
    bottom: 72px;
    max-width: none;
  }
}

/* Non-Dismissible PWA Auto-Update Modal */
.pwa-update-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(2, 6, 23, 0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pwa-update-card {
  background: #0f1520; border: 1px solid #334155; border-radius: 16px;
  width: 100%; max-width: 380px; padding: 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.pwa-update-icon-box {
  width: 64px; height: 64px; border-radius: 14px; background: #151d2c;
  border: 1px solid #334155; display: flex; align-items: center;
  justify-content: center; padding: 10px;
}
.pwa-update-icon-img { width: 100%; height: 100%; object-fit: contain; }
.pwa-update-heading { font-size: 15px; font-weight: 700; color: #ffffff; line-height: 1.35; }
.pwa-update-subtext { font-size: 12.5px; color: #94a3b8; line-height: 1.4; margin-top: 4px; }
.pwa-update-btn {
  width: 100%; height: 44px; background: var(--accent, #ea580c);
  color: #ffffff; border: none; border-radius: 8px; font-size: 13.5px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px; transition: background-color 150ms ease;
}
.pwa-update-btn:hover { background: var(--accent-hover, #f97316); }
.pwa-update-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.pwa-update-btn-icon { width: 16px; height: 16px; }
.pwa-update-btn-icon.rotating { animation: gp-spin 1s linear infinite; }
@keyframes gp-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
