/* ============================================
   COMPONENTES CSS COMPARTIDOS - Sistemias
   Estilos reutilizables en todo el proyecto
   ============================================ */

/* ============================================
   RESET GLOBAL
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   BODY BASE - Tipografía compartida
   ============================================ */
body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

/* ============================================
   FOOTER BASE
   ============================================ */
footer {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 40px 0;
  text-align: center;
  margin-top: 40px;
}

/* ============================================
   FOOTER CONTENEDOR Y COPYRIGHT
   ============================================ */
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   BOTÓN DE WHATSAPP FLOTANTE
   ============================================ */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.whatsapp-button:hover,
.whatsapp-button:focus {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  color: white;
  outline: none;
}

.whatsapp-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ============================================
   BOTÓN VOLVER ARRIBA
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--color-swift-orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  color: white;
  outline: none;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ============================================
   ESTILOS DE ALERTAS PERSONALIZADAS
   (Usados por showAlert en utils.js)
   ============================================ */
.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 1rem 1.5rem;
  background: white;
  color: #333;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
}

.custom-alert--success { border-left: 4px solid #28a745; }
.custom-alert--error { border-left: 4px solid #dc3545; }
.custom-alert--info { border-left: 4px solid #17a2b8; }
.custom-alert--warning { border-left: 4px solid #ffc107; }

.custom-alert__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #333;
}

.custom-alert__icon {
  font-size: 1.5rem;
  color: #333;
}

.custom-alert__message {
  flex: 1;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.custom-alert__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  line-height: 1;
}

.custom-alert__close:hover {
  color: #000;
}

/* ============================================
   ANIMACIONES COMUNES
   ============================================ */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ============================================
   RESPONSIVE COMPARTIDO
   ============================================ */
@media (max-width: 768px) {
  .whatsapp-button {
    width: 45px;
    height: 45px;
  }

  .whatsapp-button svg {
    width: 20px;
    height: 20px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 75px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}
