/* Base do widget */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

/* Controle de lado */
.whatsapp-widget.position-right {
    right: 20px;
}

.whatsapp-widget.position-left {
    left: 20px;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

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

.whatsapp-icon {
    width: 32px;
    height: 32px;
    fill: white;
}

.contacts-popup {
    position: absolute;
    bottom: 70px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Ajuste do popup para direita */
.whatsapp-widget.position-right .contacts-popup {
    right: 0;
}

/* Ajuste do popup para esquerda */
.whatsapp-widget.position-left .contacts-popup {
    left: 0;
}

/* Mostrar popup ao hover */
.whatsapp-widget:hover .contacts-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popup-header {
    background: #25D366;
    color: white;
    padding: 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
    font-weight: 600;
    font-size: 1rem;
}

.popup-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.contacts-list {
    padding: 0.5rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item:hover {
    background-color: #f8f9fa;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.contact-avatar svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.contact-role {
    font-size: 0.75rem;
    color: #666;
}

.contact-status {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    margin-right: 5px;
}

.status-text {
    font-size: 0.6875rem;
    color: #4CAF50;
    font-weight: 500;
}

/* Animação de pulso */
.whatsapp-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    70% {
        transform: scale(1.4);
        opacity: 0;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Seta do popup - Direita */
.whatsapp-widget.position-right .contacts-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* Seta do popup - Esquerda */
.whatsapp-widget.position-left .contacts-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* Responsivo */
@media (max-width: 480px) {
    .whatsapp-widget.position-right .contacts-popup {
        right: -10px;
        left: auto;
    }

    .whatsapp-widget.position-left .contacts-popup {
        left: -10px;
        right: auto;
    }
}
