/* =====================================================
   WA Button Tracker — Public Styles
   ===================================================== */

:root {
  --wabt-bg: #25D366;
  --wabt-fg: #ffffff;
  --wabt-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  --wabt-radius: 50px;
  --wabt-z: 9999;
  --wabt-spacing: 24px;
}

/* Container / posicionamiento */
#wabt-container {
  position: fixed;
  z-index: var(--wabt-z);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
  /* Reset explícito para que ningún tema agregue fondo/borde/padding */
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#wabt-container.wabt-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Posiciones */
.wabt-pos-bottom-right {
  bottom: var(--wabt-spacing);
  right:  var(--wabt-spacing);
}
.wabt-pos-bottom-left {
  bottom: var(--wabt-spacing);
  left:   var(--wabt-spacing);
  align-items: flex-start;
}
.wabt-pos-top-right {
  top:   var(--wabt-spacing);
  right: var(--wabt-spacing);
}
.wabt-pos-top-left {
  top:  var(--wabt-spacing);
  left: var(--wabt-spacing);
  align-items: flex-start;
}

/* Botón */
.wabt-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--wabt-bg);
  color: var(--wabt-fg);
  border: none;
  border-radius: var(--wabt-radius);
  height: var(--wabt-size, 52px);
  padding: 0 calc(var(--wabt-size, 52px) * 0.42) 0 calc(var(--wabt-size, 52px) * 0.35);
  cursor: pointer;
  box-shadow: var(--wabt-shadow);
  font-family: inherit;
  font-size: var(--wabt-font-size, 14px);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  outline-offset: 3px;
}

.wabt-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
  filter: brightness(1.05);
}

.wabt-button:active {
  transform: scale(0.97);
}

/* Sin label → botón circular */
.wabt-button:not(:has(.wabt-label)) {
  padding: 0;
  width:  var(--wabt-size, 52px);
  border-radius: 50%;
}

/* Icono */
.wabt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Tooltip */
.wabt-tooltip {
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  max-width: 220px;
}

#wabt-container:hover .wabt-tooltip,
#wabt-container:focus-within .wabt-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Pulse animation */
@keyframes wabt-pulse-ring {
  0%   { transform: scale(1);   opacity: .7; }
  80%  { transform: scale(1.55); opacity: 0;  }
  100% { transform: scale(1.55); opacity: 0;  }
}

.wabt-pulse .wabt-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--wabt-bg);
  animation: wabt-pulse-ring 2.4s cubic-bezier(0.4,0,0.6,1) infinite;
  z-index: -1;
}

.wabt-button {
  position: relative;
}

/* Mobile */
@media (max-width: 600px) {
  #wabt-container {
    --wabt-spacing: 16px;
    /* Forzar tamaño compacto en mobile: 52px fijo independiente del slider */
    --wabt-size: 52px;
    --wabt-icon-size: 28px;
    /* El contenedor solo ocupa lo que ocupa el botón, sin bloque extra */
    display: inline-flex;
    width: auto;
    height: auto;
  }
  .wabt-label {
    display: none;
  }
  .wabt-button {
    /* Circular exacto — width = height = --wabt-size */
    display: block;
    width:  var(--wabt-size, 52px);
    height: var(--wabt-size, 52px);
    padding: 0;
    border-radius: 50%;
    /* Asegurar que no haya overflow ni área extra */
    overflow: hidden;
  }
  .wabt-tooltip {
    display: none; /* No tiene sentido en touch */
  }
}