/**
 * WhatsApp Conecta Flotante - Estilos
 * Desarrollado por Conecta .NET
 */

/* Contenedor del botón */
#wcf-whatsapp-button {
    position: fixed !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

/* Enlace/botón circular — protegido contra estilos del tema */
#wcf-whatsapp-button a.wcf-whatsapp-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    background-image: none !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    font-size: 0 !important;
    color: transparent !important;
    cursor: pointer !important;
    float: none !important;
    vertical-align: baseline !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
    clip: auto !important;
}

/* Hover solo sin animación activa en el breakpoint actual */
@media (min-width: 769px) {
    #wcf-whatsapp-button[data-desktop-anim="none"] a.wcf-whatsapp-link:hover,
    #wcf-whatsapp-button[data-desktop-anim="none"] a.wcf-whatsapp-link:focus {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    }
}

@media (max-width: 768px) {
    #wcf-whatsapp-button[data-mobile-anim="none"] a.wcf-whatsapp-link:hover,
    #wcf-whatsapp-button[data-mobile-anim="none"] a.wcf-whatsapp-link:focus {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    }
}

#wcf-whatsapp-button a.wcf-whatsapp-link::before {
    display: none !important;
    content: none !important;
}

/* Icono SVG */
#wcf-whatsapp-button .wcf-icon {
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    position: static !important;
    float: none !important;
    vertical-align: middle !important;
    pointer-events: none !important;
}

#wcf-whatsapp-button .wcf-icon path {
    fill: inherit !important;
}

/* ===== ANIMACIONES — Escritorio ===== */
@media (min-width: 769px) {
    #wcf-whatsapp-button[data-desktop-anim="pulse"] a.wcf-whatsapp-link {
        overflow: visible !important;
    }

    #wcf-whatsapp-button[data-desktop-anim="pulse"] a.wcf-whatsapp-link::after {
        display: block !important;
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        border-radius: 50% !important;
        border: 2px solid rgba(37, 211, 102, 0.7) !important;
        box-sizing: border-box !important;
        animation: wcfPulseRing 2s ease-out infinite !important;
        pointer-events: none !important;
    }

    #wcf-whatsapp-button[data-desktop-anim="bounce"] a.wcf-whatsapp-link {
        animation: wcfBounce 2s ease-in-out infinite;
    }

    #wcf-whatsapp-button[data-desktop-anim="wiggle"] a.wcf-whatsapp-link {
        animation: wcfWiggle 0.5s ease-in-out infinite;
        transform-origin: center center;
    }
}

/* ===== ANIMACIONES — Móvil ===== */
@media (max-width: 768px) {
    #wcf-whatsapp-button[data-mobile-anim="pulse"] a.wcf-whatsapp-link {
        overflow: visible !important;
    }

    #wcf-whatsapp-button[data-mobile-anim="pulse"] a.wcf-whatsapp-link::after {
        display: block !important;
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        border-radius: 50% !important;
        border: 2px solid rgba(37, 211, 102, 0.7) !important;
        box-sizing: border-box !important;
        animation: wcfPulseRing 2s ease-out infinite !important;
        pointer-events: none !important;
    }

    #wcf-whatsapp-button[data-mobile-anim="bounce"] a.wcf-whatsapp-link {
        animation: wcfBounce 2s ease-in-out infinite;
    }

    #wcf-whatsapp-button[data-mobile-anim="wiggle"] a.wcf-whatsapp-link {
        animation: wcfWiggle 0.5s ease-in-out infinite;
        transform-origin: center center;
    }
}

@keyframes wcfPulseRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.45);
        opacity: 0;
    }
    100% {
        transform: scale(1.45);
        opacity: 0;
    }
}

@keyframes wcfBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes wcfWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-12deg);
    }
    75% {
        transform: rotate(12deg);
    }
}

/* Accesibilidad */
#wcf-whatsapp-button a.wcf-whatsapp-link:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 4px !important;
}

/* Modal multioperador */
#wcf-modal.wcf-modal {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

#wcf-modal.wcf-modal.wcf-modal-open {
    display: block !important;
}

#wcf-modal .wcf-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

#wcf-modal .wcf-modal-content {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    width: 300px !important;
    max-width: calc(100vw - 40px) !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    padding: 20px !important;
    margin: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    z-index: 1000001 !important;
    transform: none !important;
    overflow: visible !important;
}

#wcf-modal .wcf-modal-close {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #666 !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    text-decoration: none !important;
}

#wcf-modal .wcf-modal-title {
    margin: 0 30px 16px 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
    border: none !important;
    background: none !important;
}

#wcf-modal .wcf-operators-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

#wcf-modal .wcf-operator-item {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    background: none !important;
}

#wcf-modal .wcf-operator-item:last-child {
    margin-bottom: 0 !important;
}

#wcf-modal a.wcf-operator-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    background: #f5f5f5 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: #1a1a1a !important;
    transition: background 0.2s ease !important;
    border: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

#wcf-modal a.wcf-operator-link:hover,
#wcf-modal a.wcf-operator-link:focus {
    background: #e8f8ef !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
}

#wcf-modal .wcf-operator-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    background: #25D366 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

#wcf-modal .wcf-operator-icon svg {
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

#wcf-modal .wcf-operator-name {
    font-weight: 500 !important;
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    #wcf-modal .wcf-modal-content {
        right: 15px !important;
        bottom: 80px !important;
        width: 280px !important;
    }
}

@media print {
    #wcf-whatsapp-button,
    #wcf-modal {
        display: none !important;
    }
}
