/* ══════════════════════════════════════
   globals/whatsapp — CSS
   Clases propias: .lt-wa-* (sin colisión)
   Enqueue en WP en TODAS las páginas.
   z-index: 8500 — debajo del modal (9000)
             y del header (9999)
══════════════════════════════════════ */

/* ── Contenedor ───────────────────────────────── */
.lt-wa-wrap {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 8500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .6rem;
    pointer-events: none;
}

/* ── FAB principal ────────────────────────────── */
.lt-wa-fab {
    pointer-events: auto;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: var(--color-green, #39b54a);
    color: var(--color-black, #000);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(57, 181, 74, .45);
    transition: background .2s ease;
    flex-shrink: 0;
}

.lt-wa-fab:hover {
    background: #45cc58;
    box-shadow: 0 6px 28px rgba(57, 181, 74, .6);
}

.lt-wa-fab:focus-visible {
    outline: 2px solid var(--color-green, #39b54a);
    outline-offset: 3px;
}

/* Ícono WSP */
.lt-wa-icon-wsp {
    width: 30px;
    height: 30px;
    position: absolute;
    transition: opacity .2s ease, transform .2s ease;
}

/* Ícono X — oculto por defecto */
.lt-wa-icon-close {
    width: 20px;
    height: 20px;
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(.7);
    transition: opacity .2s ease, transform .2s ease;
    color: var(--color-black, #000);
}

/* Estado abierto — swap de íconos vía JS con clase */
.lt-wa-fab.is-open .lt-wa-icon-wsp {
    opacity: 0;
    transform: rotate(90deg) scale(.7);
}

.lt-wa-fab.is-open .lt-wa-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Pulso idle — pseudoelemento, compositor sin repaint */
.lt-wa-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(57, 181, 74, .4);
    animation: lt-wa-pulse 2.8s ease-in-out infinite;
    pointer-events: none;
}

.lt-wa-fab:hover::before,
.lt-wa-fab.is-open::before {
    animation: none;
    opacity: 0;
}

@keyframes lt-wa-pulse {
    0%, 70%, 100% { transform: scale(1);    opacity: 0; }
    35%            { transform: scale(1.45); opacity: 0.4; }
}

/* ── Sub-botones ──────────────────────────────── */
.lt-wa-item {
    min-width: 148px;
    padding: .55rem .9rem .55rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(6, 12, 24, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: .15rem;
    cursor: pointer;
    text-decoration: none;
    /* Estado inicial — GSAP lo anima */
    opacity: 0;
    transform: scale(0);
    transform-origin: bottom right;
    transition: border-color .2s ease, background .2s ease;
    border-left: 2px solid var(--color-green, #39b54a);
    /* Evita que ocupe espacio cuando está oculto */
    pointer-events: none;
}

/* Habilitado cuando está abierto — JS añade clase al wrap */
.lt-wa-wrap.is-open .lt-wa-item {
    pointer-events: auto;
}

.lt-wa-item:hover {
    background: rgba(57, 181, 74, .08);
    border-color: rgba(57, 181, 74, .35);
    border-left-color: var(--color-green, #39b54a);
}

.lt-wa-item:focus-visible {
    outline: 2px solid var(--color-green, #39b54a);
    outline-offset: 2px;
}

.lt-wa-label {
    font-family: var(--font-body, 'Poppins', sans-serif);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-green, #39b54a);
    line-height: 1;
}

.lt-wa-number {
    font-family: var(--font-body, 'Poppins', sans-serif);
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    line-height: 1.2;
    white-space: nowrap;
}

/* ── Responsive ───────────────────────────────── */

/* Mobile pequeño — FAB y sub-botones ligeramente reducidos */
@media (max-width: 479px) {
    .lt-wa-wrap {
        bottom: 1.4rem;
        right: 1.4rem;
    }

    .lt-wa-fab {
        width: 54px;
        height: 54px;
    }

    .lt-wa-icon-wsp  { width: 26px; height: 26px; }

    .lt-wa-item {
        min-width: 132px;
        padding: .5rem .8rem .5rem .85rem;
    }

    .lt-wa-number { font-size: .78rem; }
}

/* Landscape mobile — FAB más pequeño y pegado más arriba
   para no tapar contenido en pantallas cortas */
@media (max-height: 500px) and (max-width: 959px) {
    .lt-wa-wrap {
        bottom: 1rem;
        right: 1.2rem;
    }

    .lt-wa-fab {
        width: 48px;
        height: 48px;
    }

    .lt-wa-icon-wsp  { width: 22px; height: 22px; }

    .lt-wa-item {
        min-width: 120px;
        padding: .4rem .7rem .4rem .75rem;
        border-radius: 10px;
    }

    .lt-wa-label  { font-size: .6rem; }
    .lt-wa-number { font-size: .74rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lt-wa-fab { animation: none !important; }
}
