/* PWA Install Button Styles */

#pwa-install-button {
  /* Posicionamento */
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  
  /* Layout */
  display: none; /* Oculto por padrão, mostrado via JavaScript */
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  
  /* Visual */
  background: linear-gradient(135deg, #7C4DFF 0%, #9C27B0 100%);
  color: white;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.4),
              0 8px 16px rgba(0, 0, 0, 0.2);
  
  /* Tipografia */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  
  /* Interação */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Esconder overflow para animação */
  overflow: hidden;
}

/* Ícone dentro do botão */
#pwa-install-button::before {
  content: "📱";
  font-size: 20px;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Hover sobre o botão */
#pwa-install-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(124, 77, 255, 0.5),
              0 12px 20px rgba(0, 0, 0, 0.25);
}

#pwa-install-button:hover::before {
  transform: scale(1.1) rotate(5deg);
}

/* Efeito de clique */
#pwa-install-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 12px rgba(124, 77, 255, 0.3),
              0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Animação de entrada */
#pwa-install-button.show {
  animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efeito de pulso sutil para chamar atenção */
#pwa-install-button.show::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.3);
  animation: pulse 2s infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

/* Responsividade para mobile */
@media screen and (max-width: 768px) {
  #pwa-install-button {
    bottom: 16px;
    right: 16px;
    left: 16px;
    justify-content: center;
    padding: 16px 20px;
    font-size: 14px;
  }
}

/* Modo escuro automático (opcional) */
@media (prefers-color-scheme: dark) {
  #pwa-install-button {
    background: linear-gradient(135deg, #9D50BB 0%, #6E48AA 100%);
    box-shadow: 0 4px 20px rgba(157, 80, 187, 0.4),
                0 8px 16px rgba(0, 0, 0, 0.3);
  }
  
  #pwa-install-button:hover {
    box-shadow: 0 6px 24px rgba(157, 80, 187, 0.5),
                0 12px 20px rgba(0, 0, 0, 0.35);
  }
}

/* Estado de loading (opcional, para uso futuro) */
#pwa-install-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

#pwa-install-button.loading::before {
  content: "⏳";
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
