/**
 * Estilos públicos para Lorreny WhatsApp Plugin
 * Botão flutuante e componentes frontend
 */

/* ===== RESET E PREVENÇÃO DE CONFLITOS ===== */
.lorreny-wa-floating-button,
.lorreny-wa-floating-button *,
.lorreny-wa-modal,
.lorreny-wa-modal * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== BOTÃO FLUTUANTE ===== */
.lorreny-wa-floating-button {
    position: fixed;
    z-index: 999998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Animação de entrada */
    animation: lorrenyWASlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Posicionamento */
.lorreny-wa-button-bottom-right {
    bottom: 20px;
    right: 20px;
}

.lorreny-wa-button-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Botão principal */
/*.lorreny-wa-btn-main {
    background: var(--button-color, #25D366);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 60px;
    min-height: 60px;
    justify-content: center;
}*/

.lorreny-wa-btn-main:hover {
    background: var(--button-color-hover, #1ea952);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
}

.lorreny-wa-btn-main:active {
    transform: translateY(-1px) scale(1.02);
}

/* Ícone WhatsApp */
.lorreny-wa-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Texto do botão */
.lorreny-wa-btn-text {
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Indicador de notificação */
.lorreny-wa-notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #ff4757;
    border: 2px solid white;
    border-radius: 50%;
    animation: lorrenyWAPulse 2s infinite;
    display: none; /* Mostrar quando necessário */
}

/* Tooltip */
.lorreny-wa-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.lorreny-wa-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.lorreny-wa-floating-button:hover .lorreny-wa-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* ===== RESPONSIVO ===== */

/* Tablets */
@media (max-width: 768px) {
    .lorreny-wa-floating-button {
        bottom: 15px;
    }
    
    .lorreny-wa-button-bottom-right {
        right: 15px;
    }
    
    .lorreny-wa-button-bottom-left {
        left: 15px;
    }
    
    .lorreny-wa-btn-main {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .lorreny-wa-icon {
        width: 24px;
        height: 24px;
    }
    
    /* Ocultar texto em telas pequenas */
    .lorreny-wa-btn-text {
        display: none;
    }
    
    .lorreny-wa-btn-main {
        border-radius: 50%;
        width: 56px;
        height: 56px;
        padding: 14px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .lorreny-wa-floating-button {
        bottom: 12px;
    }
    
    .lorreny-wa-button-bottom-right {
        right: 12px;
    }
    
    .lorreny-wa-button-bottom-left {
        left: 12px;
    }
    
    .lorreny-wa-btn-main {
        width: 52px;
        height: 52px;
        padding: 12px;
    }
    
    .lorreny-wa-icon {
        width: 22px;
        height: 22px;
    }
    
    /* Tooltip responsivo */
    .lorreny-wa-tooltip {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ===== ANIMAÇÕES ===== */

/* Entrada do botão */
@keyframes lorrenyWASlideIn {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.3);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Pulso da notificação */
@keyframes lorrenyWAPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Efeito de ondulação ao clicar */
@keyframes lorrenyWARipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.lorreny-wa-btn-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.lorreny-wa-btn-main:active::before {
    width: 300px;
    height: 300px;
    animation: lorrenyWARipple 0.6s ease-out;
}

/* ===== ESTADOS ESPECIAIS ===== */

/* Botão desabilitado */
.lorreny-wa-btn-main:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

/* Modo escuro automático */
@media (prefers-color-scheme: dark) {
    .lorreny-wa-tooltip {
        background: rgba(255, 255, 255, 0.9);
        color: #1f2937;
    }
    
    .lorreny-wa-tooltip::after {
        border-top-color: rgba(255, 255, 255, 0.9);
    }
}

/* ===== ACESSIBILIDADE ===== */

/* Foco para navegação por teclado */
.lorreny-wa-btn-main:focus {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 3px;
}

/* Reduzir movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
    .lorreny-wa-floating-button,
    .lorreny-wa-btn-main,
    .lorreny-wa-tooltip,
    .lorreny-wa-notification-dot {
        animation: none !important;
        transition: none !important;
    }
    
    .lorreny-wa-btn-main:hover {
        transform: none;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .lorreny-wa-btn-main {
        border: 2px solid white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    }
    
    .lorreny-wa-tooltip {
        background: black;
        color: white;
        border: 1px solid white;
    }
}

/* =============================================================== */
/* ✅ CSS CORRIGIDO E FINAL PARA O BOTÃO FLUTUANTE */
/* =============================================================== */

/* Usamos o ID para tornar a regra mais forte que a do tema */
#lorreny-wa-floating-button .lorreny-wa-btn-main {
    /* --- Estilos Essenciais do Botão --- */
    display: grid; /* ✅ MANTENHA O FLEX para alinhar corretamente */
    align-items: center;
    justify-content: center;
    /* gap: 10px; */ /* <-- REMOVA OU COMENTE ESTA LINHA PARA TIRAR O ESPAÇO */
    
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-transform: none;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding: 20px 20px;
    min-width: 60px;
    min-height: 60px;
    
    /* --- Cores Personalizadas --- */
    background-color: var(--button-bg-color, #25D366);
    color: var(--button-icon-color, #FFFFFF);
    
    /* --- Efeitos Visuais --- */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Efeito ao passar o mouse */
#lorreny-wa-floating-button .lorreny-wa-btn-main:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    filter: brightness(95%);
}

/* Estilo específico para o ícone SVG */
#lorreny-wa-floating-button .lorreny-wa-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    fill: currentColor;
}

/* Estilo para o texto do botão (quando visível) */
#lorreny-wa-floating-button .lorreny-wa-btn-text {
    white-space: nowrap;
    /* ✅ Adiciona um espaço seguro apenas à esquerda do texto */
    margin-left: 8px; 
}

/* ===== COMPATIBILIDADE COM BUILDERS ===== */

/* Elementor */
.elementor-widget-container .lorreny-wa-floating-button {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    display: inline-block;
}

/* Divi */
.et_pb_module .lorreny-wa-floating-button {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    display: inline-block;
}

/* Gutenberg */
.wp-block-group .lorreny-wa-floating-button {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    display: inline-block;
}

/* ===== CLASSES UTILITÁRIAS ===== */

/* Ocultar em dispositivos específicos */
.lorreny-wa-hide-mobile {
    display: block;
}

.lorreny-wa-hide-desktop {
    display: none;
}

@media (max-width: 768px) {
    .lorreny-wa-hide-mobile {
        display: none;
    }
    
    .lorreny-wa-hide-desktop {
        display: block;
    }
}

/* Variações de tamanho para uso em shortcodes */
.lorreny-wa-size-small .lorreny-wa-btn-main {
    padding: 10px 16px;
    font-size: 14px;
    min-width: 48px;
    min-height: 48px;
}

.lorreny-wa-size-small .lorreny-wa-icon {
    width: 20px;
    height: 20px;
}

.lorreny-wa-size-large .lorreny-wa-btn-main {
    padding: 18px 24px;
    font-size: 18px;
    min-width: 72px;
    min-height: 72px;
}

.lorreny-wa-size-large .lorreny-wa-icon {
    width: 32px;
    height: 32px;
}