/* ============================================
   FIX v1.7 (build v1.9) — Botón "Volver arriba"
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gf-primary);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.15s ease;
  z-index: 9998; /* debajo del chat Cliengo que suele ser 9999 */
  padding: 0;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gf-green-700);
  transform: translateY(-3px);
}

.back-to-top:active {
  transform: translateY(0);
}

/* En móvil, moverlo un poco más arriba para no chocar con Cliengo */
@media (max-width: 720px) {
  .back-to-top {
    bottom: 88px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* Ícono flecha usando pseudo-element para mayor control */
.back-to-top::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(-45deg) translateY(2px);
}
