/**
 * JG WhatsApp - Estilos del módulo
 * Compatible con PrestaShop 8.2+
 */

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */

.jgwhatsapp-floating {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

/* Posición derecha */
.jgwhatsapp-floating.jgwhatsapp-right {
    right: 20px;
}

/* Posición izquierda */
.jgwhatsapp-floating.jgwhatsapp-left {
    left: 20px;
}

/* Botón principal */
.jgwhatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: jgwhatsapp-pulse 2s infinite;
}

.jgwhatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    animation: none;
}

.jgwhatsapp-btn:active {
    transform: scale(0.95);
}

/* Icono SVG */
.jgwhatsapp-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* Animación de pulso */
@keyframes jgwhatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Tooltip de texto (opcional) */
.jgwhatsapp-tooltip {
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.jgwhatsapp-floating:hover .jgwhatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   BOTÓN COMPARTIR PRODUCTO
   ========================================================================== */

.jgwhatsapp-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px 0;
    border: none;
    cursor: pointer;
}

.jgwhatsapp-share:hover {
    background-color: #128C7E;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.jgwhatsapp-share:active {
    transform: translateY(0);
}

.jgwhatsapp-share svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

.jgwhatsapp-share-text {
    line-height: 1;
}

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 991px) {
    .jgwhatsapp-floating {
        bottom: 15px;
    }

    .jgwhatsapp-floating.jgwhatsapp-right {
        right: 15px;
    }

    .jgwhatsapp-floating.jgwhatsapp-left {
        left: 15px;
    }

    .jgwhatsapp-btn {
        width: 55px;
        height: 55px;
    }

    .jgwhatsapp-btn svg {
        width: 28px;
        height: 28px;
    }

    .jgwhatsapp-tooltip {
        display: none;
    }
}

/* ==========================================================================
   RESPONSIVE - MÓVIL
   ========================================================================== */

@media (max-width: 576px) {
    .jgwhatsapp-floating {
        bottom: 12px;
    }

    .jgwhatsapp-floating.jgwhatsapp-right {
        right: 12px;
    }

    .jgwhatsapp-floating.jgwhatsapp-left {
        left: 12px;
    }

    .jgwhatsapp-btn {
        width: 50px;
        height: 50px;
    }

    .jgwhatsapp-btn svg {
        width: 26px;
        height: 26px;
    }

    .jgwhatsapp-share {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
}

/* ==========================================================================
   ACCESIBILIDAD
   ========================================================================== */

.jgwhatsapp-btn:focus,
.jgwhatsapp-share:focus {
    outline: 3px solid #128C7E;
    outline-offset: 3px;
}

/* Respeta preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .jgwhatsapp-btn,
    .jgwhatsapp-share,
    .jgwhatsapp-floating {
        animation: none;
        transition: none;
    }
}

/* ==========================================================================
   MODO OSCURO (si el tema lo soporta)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .jgwhatsapp-tooltip {
        background-color: #f5f5f5;
        color: #333;
    }
}
