/**
 * PWA STYLES - MiniNube
 * Archivo: assets/css/pwa.css
 */

/* BOTÓN DE INSTALAR */
.install-pwa-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  margin-right: 10px;
  display: none;
  position: relative;
  overflow: hidden;
}

.install-pwa-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* ANIMACIÓN PULSE */
.install-pwa-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.install-pwa-button:active::before {
  width: 300px;
  height: 300px;
}

/* BANNER iOS */
.ios-install-banner {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* NOTIFICACIÓN DE ÉXITO */
.notif-exito {
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .install-pwa-button {
    padding: 8px 15px;
    font-size: 13px;
    margin-right: 5px;
  }
}

/* PANTALLA COMPLETA (MODO STANDALONE) */
@media (display-mode: standalone) {
  .install-pwa-button {
    display: none !important;
  }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
  .install-pwa-button {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
  }
}

/* INSTALANDO */
.install-pwa-button.installing {
  opacity: 0.6;
  cursor: not-allowed;
}

.install-pwa-button.installing::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* INSTALADA */
.install-pwa-button.installed {
  background: #28a745;
}

.install-pwa-button.installed::before {
  content: '✓';
  position: absolute;
  left: 10px;
  color: white;
}
