/* ===== VARIABLES ===== */

#whatsapp-widget {

  --wa-bg: #ffffff;
  --wa-text: #222;

}

/* DARK MODE */

[data-theme="dark"] #whatsapp-widget {

  --wa-bg: #1e1e1e;
  --wa-text: #ffffff;

}


/* CONTENEDOR */

#whatsapp-widget {

  position: fixed;
  bottom: 20px;
  right: 20px;

  z-index: 9999;

  font-family: 'Segoe UI', sans-serif;

}


/* BOTÓN */

.whatsapp-button {

  width: 65px;
  height: 65px;

  border-radius: 50%;

  background: linear-gradient(135deg,#25D366,#128C7E);

  border: none;

  cursor: pointer;

  color: white;

  font-size: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 10px 30px rgba(0,0,0,0.35);

  animation: float 3s infinite;

}

@keyframes float {

  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }

}


/* BADGE */

.notification-badge {

  position: absolute;

  top: -8px;
  right: -8px;

  background: red;

  color: white;

  padding: 5px 8px;

  border-radius: 50%;

  font-size: 12px;

  display: none;

}


/* CHAT */

.chat-box {

  width: 320px;
  max-width: 90vw;

  background: var(--wa-bg);
  color: var(--wa-text);

  border-radius: 16px;

  box-shadow: 0 15px 45px rgba(0,0,0,0.35);

  position: absolute;

  bottom: 85px;
  right: 0;

  overflow: hidden;

  display: none;

}


/* HEADER */

.chat-header {

  background: linear-gradient(135deg,#25D366,#128C7E);

  color: white;

  display: flex;
  align-items: center;

  padding: 12px;

}


.chat-avatar img {

  width: 45px;
  height: 45px;

  border-radius: 50%;

}


/* BODY */

.chat-body {

  padding: 16px;

}

.message {

  background: rgba(0,0,0,0.05);

  padding: 12px;

  border-radius: 10px;

  color: var(--wa-text);

}


/* FOOTER */

.chat-footer {

  padding: 12px;

  display: flex;
  flex-direction: column;

  gap: 8px;

}


/* BOTONES */

.btn {

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px;

  border-radius: 10px;

  font-weight: bold;

  text-decoration: none;

  color: white;

}

.whatsapp-btn {

  background: #25D366;

}

.call-btn {

  background: #4da6ff;

}

.chat-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

#statusText {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 5px; /* Espacio entre el punto y el texto */
  margin-top: 2px;
}

/* El punto verde estilo WhatsApp */
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #00e676; /* Verde vibrante */
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px rgba(0, 230, 118, 0.5); /* Brillo sutil */
}

/* Botón de cierre más pequeño y a la derecha */
.close-btn {
  background: transparent;
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin-left: auto; /* Lo empuja totalmente a la derecha */
  opacity: 0.8;
}

.close-btn:hover {
  opacity: 1;
}