/* global.css — barra fija de WhatsApp (.gl-) y aparición (.reveal) */

.gl-barra {
  display: none;
}

@media (max-width: 899.98px) {
  .gl-barra {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--crema, #FAF5EC);
    border-top: 1px solid rgba(22, 30, 46, 0.12);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(22, 30, 46, 0.08);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 250ms ease, opacity 250ms ease, visibility 0s linear 250ms;
  }

  .gl-barra.gl-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 250ms ease, opacity 250ms ease, visibility 0s;
  }

  .gl-barra .btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .gl-barra .gl-icono {
    width: 20px;
    height: 20px;
    flex: none;
  }

  .gl-barra .btn-wa.gl-pulso {
    animation: gl-pulso 1.2s ease-in-out 1;
  }
}

@keyframes gl-pulso {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 163, 61, 0);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(232, 163, 61, 0.35);
  }
}

/* Aparición: el estado oculto solo existe si JS agregó .reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .gl-barra,
  .gl-barra.gl-visible {
    transition: none;
  }
  .gl-barra .btn-wa.gl-pulso {
    animation: none;
  }
  .reveal,
  .reveal.reveal-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}