/* 🚀 PWA Install Button Styles */
.install-pwa-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.install-pwa-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 122, 255, 0.5);
  background: linear-gradient(135deg, #0056CC 0%, #4A4AC7 100%);
}

.install-pwa-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.install-pwa-button .install-icon {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #007AFF;
}

.install-pwa-button .install-text {
  white-space: nowrap;
}

/* Animazione di entrata */
.install-pwa-button.animate-in {
  animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsante per mobile */
@media (max-width: 768px) {
  .install-pwa-button {
    bottom: 16px;
    right: 16px;
    left: 16px;
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 25px;
    justify-content: center;
  }
  
  .install-pwa-button .install-text {
    font-size: 15px;
  }
}

/* Pulsante per tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .install-pwa-button {
    bottom: 24px;
    right: 24px;
    padding: 18px 28px;
    font-size: 17px;
  }
}

/* Nascondi pulsante quando l'app è già installata */
.install-pwa-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100px);
  transition: all 0.3s ease;
}

/* Stile per quando l'app è in modalità standalone */
@media (display-mode: standalone) {
  .install-pwa-button {
    display: none !important;
  }
}

/* Pulsante di successo dopo installazione */
.install-pwa-button.success {
  background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.4);
}

.install-pwa-button.success:hover {
  background: linear-gradient(135deg, #2FB344 0%, #28CD41 100%);
  box-shadow: 0 12px 32px rgba(52, 199, 89, 0.5);
}

.install-pwa-button.success .install-icon {
  color: #34C759;
}

/* Pulsante di errore */
.install-pwa-button.error {
  background: linear-gradient(135deg, #FF3B30 0%, #FF453A 100%);
  box-shadow: 0 8px 24px rgba(255, 59, 48, 0.4);
}

.install-pwa-button.error:hover {
  background: linear-gradient(135deg, #E6342A 0%, #E63E35 100%);
  box-shadow: 0 12px 32px rgba(255, 59, 48, 0.5);
}

.install-pwa-button.error .install-icon {
  color: #FF3B30;
}
