/* JoinChat Plugin Styles */

.joinchat-button {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: joinchat-pulse 2s infinite;
}

.joinchat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.joinchat-button.joinchat-right {
    right: 20px;
}

.joinchat-button.joinchat-left {
    left: 20px;
}

.joinchat-button-inner {
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.joinchat-button-inner svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

/* Animação de pulso */
@keyframes joinchat-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Tooltip */
.joinchat-button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.joinchat-button.joinchat-left::before {
    right: auto;
    left: 0;
}

.joinchat-button:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 75px;
}

/* Responsividade */
@media (max-width: 768px) {
    .joinchat-button.joinchat-hide-mobile {
        display: none !important;
    }
    
    .joinchat-button {
        width: 55px;
        height: 55px;
        bottom: 15px;
    }
    
    .joinchat-button.joinchat-right {
        right: 15px;
    }
    
    .joinchat-button.joinchat-left {
        left: 15px;
    }
    
    .joinchat-button-inner svg {
        width: 26px;
        height: 26px;
    }
}

@media (min-width: 769px) {
    .joinchat-button.joinchat-hide-desktop {
        display: none !important;
    }
}

/* Estados especiais */
.joinchat-button.joinchat-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.joinchat-button.joinchat-show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Efeito de clique */
.joinchat-button:active {
    transform: scale(0.95);
}

/* Customização para temas escuros */
@media (prefers-color-scheme: dark) {
    .joinchat-button::before {
        background: #555;
        color: #fff;
    }
}

/* Integração com Elementor */
.elementor-widget-joinchat .joinchat-button {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    margin: 0 auto;
}

.elementor-widget-joinchat .joinchat-button::before {
    display: none;
}

/* Acessibilidade */
.joinchat-button:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .joinchat-button {
        animation: none;
    }
    
    .joinchat-button,
    .joinchat-button::before {
        transition: none;
    }
}

/* Suporte para RTL */
[dir="rtl"] .joinchat-button.joinchat-right {
    right: auto;
    left: 20px;
}

[dir="rtl"] .joinchat-button.joinchat-left {
    left: auto;
    right: 20px;
}

[dir="rtl"] .joinchat-button::before {
    right: auto;
    left: 0;
}

[dir="rtl"] .joinchat-button.joinchat-left::before {
    left: auto;
    right: 0;
}