/* PWA Install Banner */
#pwa-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#pwa-install-overlay.pwa-visible {
  opacity: 1;
  pointer-events: auto;
}

.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.pwa-install-banner {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 28px;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-visible .pwa-install-banner {
  transform: translateY(0);
}

.pwa-install-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pwa-install-close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Header with icon and info */
.pwa-install-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.pwa-install-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  background: #f0f4ff;
  padding: 6px;
  flex-shrink: 0;
}

.pwa-install-info {
  min-width: 0;
}

.pwa-install-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2px;
  line-height: 1.2;
}

.pwa-install-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* Feature pills */
.pwa-install-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pwa-install-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  color: #1e40af;
  font-weight: 500;
  white-space: nowrap;
}

.pwa-install-feature svg {
  flex-shrink: 0;
}

/* Native install button (Chrome/Edge) */
.pwa-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35);
}

.pwa-install-btn:active {
  transform: translateY(0);
}

.pwa-install-btn svg {
  flex-shrink: 0;
}

/* Guide for iOS / Firefox / Samsung */
.pwa-install-guide {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.pwa-guide-text {
  font-size: 14px;
  color: #374151;
  margin: 0 0 14px;
  line-height: 1.5;
  text-align: center;
}

.pwa-guide-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pwa-guide-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pwa-step-icon {
  width: 48px;
  height: 48px;
  background: #dbeafe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-guide-step span {
  font-size: 11px;
  color: #4b5563;
  font-weight: 500;
  text-align: center;
  max-width: 90px;
}

.pwa-guide-arrow {
  font-size: 20px;
  color: #9ca3af;
  margin-top: -20px;
}

/* Desktop adjustments */
@media (min-width: 640px) {
  .pwa-install-banner {
    border-radius: 20px;
    margin-bottom: 24px;
    max-width: 420px;
  }

  #pwa-install-overlay {
    align-items: center;
  }
}
