/* Variables CSS para mantener consistencia */
:root {
  --whatsapp-green: #25d366;
  --whatsapp-dark-green: #128C7E;
  --shadow: 0 3px 7px rgba(0, 0, 0, 0.7);
  --transition: all 0.3s ease;
}

/* Estilos base */
body {
  font-family: 'Inter', sans-serif;
}

/* Contenedores de gráficos */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  height: 320px;
  max-height: 400px;
}

/* Texto con gradiente */
.gradient-text {
  background: linear-gradient(90deg, #58508d, #ff6361);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ESTILOS PARA BOTONES DE WHATSAPP ===== */

/* Botón flotante de WhatsApp (visible inicialmente) */
.whatsapp-button {
  width: 73px;
  height: 73px;
  position: fixed;
  bottom: 23px;
  right: 23px;
  z-index: 100;
  transition: var(--transition);
  cursor: pointer;
}

/* SVG dentro del botón flotante */
.whatsapp-button svg {
  width: 90px;
  filter: drop-shadow(var(--shadow));
  transition: var(--transition);
}

.whatsapp-button circle {
  fill: var(--whatsapp-green);
  transition: var(--transition);
}

.whatsapp-button:hover circle {
  fill: var(--whatsapp-dark-green);
}

.whatsapp-button path {
  fill: #fff;
}

/* Botón de WhatsApp en la sección de oferta */
section#offer .whatsapp-button {
  display: none; /* Oculto inicialmente */
}

/* Botón normal de WhatsApp (en la oferta) */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--whatsapp-green);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-btn:hover {
  background-color: var(--whatsapp-dark-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

/* Botón de cierre para el botón flotante */
.whatsapp-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ff3333;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 101;
}

.whatsapp-button:hover .whatsapp-close {
  opacity: 1;
  transform: scale(1);
}

.whatsapp-close:hover {
  background-color: #cc0000;
  transform: scale(1.1);
}

/* ===== MEDIA QUERIES ===== */

@media (min-width: 768px) {
  .chart-container {
    height: 400px;
  }
}

/* Ocultar botón flotante cuando el botón de la oferta es visible */
.offer-button-visible .whatsapp-button {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* Mostrar botón flotante cuando no está visible el botón de oferta */
.offer-button-hidden .whatsapp-button {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Estilos responsivos para el botón flotante */
@media (max-width: 640px) {
  .whatsapp-button {
    width: 60px;
    height: 60px;
    bottom: 15px;
    right: 15px;
  }
  
  .whatsapp-button svg {
    width: 70px;
  }
  
  .whatsapp-close {
    width: 20px;
    height: 20px;
    font-size: 12px;
    top: -5px;
    right: -5px;
  }
}