/* PWA Install Popup Styles */

#pwaInstallOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#pwaInstallOverlay.show {
  opacity: 1;
  visibility: visible;
}

.pwa-install-popup {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  animation: popupSlideIn 0.4s ease forwards;
}

@keyframes popupSlideIn {
  from {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.pwa-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transform: rotate(90deg);
}

.pwa-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pwa-icon img {
  width: 50px;
  height: 50px;
}

.pwa-install-popup h2 {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.pwa-install-popup p {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 14px;
  color: #555;
  margin: 0 0 20px;
  line-height: 1.5;
}

.pwa-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.pwa-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 80px;
}

.pwa-feature-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-feature-icon img {
  width: 24px;
  height: 24px;
  opacity: 0.85;
}

.pwa-feature span:last-child {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 11px;
  color: #555;
  font-weight: 500;
}

.pwa-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.pwa-later-btn {
  width: 100%;
  padding: 12px 24px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  color: #555;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-later-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.2);
  color: #333;
}

/* iOS Instructions */
.ios-instructions {
  text-align: left;
  margin: 20px 0;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ios-step:last-child {
  border-bottom: none;
}

.step-number {
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.ios-step span:last-child {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.ios-step svg {
  vertical-align: middle;
  margin-left: 4px;
}

/* Success Toast */
.pwa-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 999999;
  opacity: 0;
  transition: all 0.3s ease;
}

.pwa-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.pwa-toast span {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .pwa-install-popup {
    padding: 24px 20px;
    margin: 16px;
    border-radius: 20px;
  }
  
  .pwa-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
  }
  
  .pwa-icon img {
    width: 42px;
    height: 42px;
  }
  
  .pwa-install-popup h2 {
    font-size: 20px;
  }
  
  .pwa-install-popup p {
    font-size: 13px;
  }
  
  .pwa-features {
    gap: 10px;
  }
  
  .pwa-feature {
    padding: 10px 8px;
    min-width: 70px;
  }
  
  .pwa-feature-icon img {
    width: 20px;
    height: 20px;
  }
  
  .pwa-feature span:last-child {
    font-size: 10px;
  }
  
  .pwa-install-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
  
  .pwa-toast {
    bottom: 20px;
    padding: 12px 20px;
    width: calc(100% - 40px);
    max-width: 320px;
  }
}

/* Dark mode support - Keep glassy white look */
@media (prefers-color-scheme: dark) {
  #pwaInstallOverlay {
    background: rgba(0, 0, 0, 0.4);
  }
  
  .pwa-install-popup {
    background: rgba(255, 255, 255, 0.92);
  }
  
  .pwa-toast {
    background: rgba(255, 255, 255, 0.95);
  }
}
