/* === Reset básico para evitar márgenes/paddings no deseados === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: sans-serif;
  background-color: #fff;
}

/* === Banner de instalación PWA === */
#pwa-banner {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1842B6;
  color: white;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  max-width: 320px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#pwa-banner.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

#pwa-banner img {
  width: 40px;
  height: 40px;
}

#pwa-banner button {
  background: #26D48C;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#pwa-banner #close-btn {
  background: transparent;
  color: white;
  font-size: 20px;
  padding: 0 8px;
  cursor: pointer;
}

#pwa-banner.ios {
  background: #2A2A2A;
}

/* === Botón flotante PEGADO al marco superior derecho === */
#floating-installer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background-color: #1842B6;
  border-radius: 50%; /* completamente redondo */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  animation: pulse 1.5s infinite;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#floating-installer img {
  width: 30px;
  height: 30px;
  pointer-events: none; /* el clic lo recibe el contenedor */
}


#floating-installer:hover {
  transform: scale(1.1);
  box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.4);
}

/* Animación de latido */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* === Responsivo para pantallas pequeñas (celulares y tablets) === */
@media (max-width: 768px) {
  #floating-installer {
    width: 70px;
    height: 70px;
  }

  #floating-installer img {
    width: 28px;
    height: 28px;
  }

  #pwa-banner {
    top: 10px;
    right: 10px;
    max-width: 90%;
    padding: 10px;
    font-size: 14px;
  }

  #pwa-banner img {
    width: 35px;
    height: 35px;
  }

  #pwa-banner button {
    padding: 6px 12px;
    font-size: 13px;
  }

  #pwa-banner #close-btn {
    font-size: 18px;
  }
}
