/* WhatsApp Multi Atendimento - Frontend */

.wma-widget {
    position: fixed;
    bottom: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.wma-widget.wma-right {
    right: 24px;
}

.wma-widget.wma-left {
    left: 24px;
}

/* Botão flutuante */
.wma-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.wma-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.wma-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.4);
}

.wma-toggle .wma-icon-whatsapp,
.wma-toggle .wma-icon-close {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup */
.wma-popup {
    position: absolute;
    bottom: 76px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: wmaSlideUp 0.25s ease;
}

.wma-widget.wma-right .wma-popup {
    right: 0;
}

.wma-widget.wma-left .wma-popup {
    left: 0;
}

@keyframes wmaSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do popup */
.wma-popup-header {
    padding: 16px 18px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wma-popup-header-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wma-popup-title {
    font-size: 16px;
    font-weight: 600;
}

.wma-popup-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.wma-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.85;
}

.wma-close:hover {
    opacity: 1;
}

/* Lista de atendentes */
.wma-popup-body {
    max-height: 340px;
    overflow-y: auto;
    padding: 8px 0;
}

.wma-attendant {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #222;
    transition: background 0.15s ease;
    gap: 12px;
}

.wma-attendant:hover {
    background: #f5f5f5;
}

.wma-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wma-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wma-avatar-placeholder {
    font-size: 18px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
}

.wma-attendant-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wma-attendant-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wma-attendant-sector {
    font-size: 12px;
    color: #777;
}

.wma-whatsapp-icon {
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 480px) {
    .wma-widget {
        bottom: 16px;
    }

    .wma-widget.wma-right {
        right: 16px;
    }

    .wma-widget.wma-left {
        left: 16px;
    }

    .wma-popup {
        width: 280px;
    }

    .wma-toggle {
        width: 54px;
        height: 54px;
    }
}
