/* Reset básico */
* { box-sizing: border-box; }

/* Contenedor principal flotante */
.wa-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    font-family: 'Segoe UI', sans-serif;
}

/* El botón verde redondo */
.wa-launcher {
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    position: relative;
}

.wa-launcher:hover {
    transform: scale(1.1);
}

/* Punto rojo de notificación (Truco psicológico para que hagan clic) */
.wa-notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background-color: red;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* La ventana de chat */
.wa-chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px; /* Ancho estándar cómodo */
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; /* Estructura vertical */
}

/* Clase para mostrar el chat (activada por JS) */
.wa-chat-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Encabezado */
.wa-header {
    background: #075E54; /* Verde oscuro WhatsApp */
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-title {
    font-size: 16px;
    font-weight: bold;
    display: block;
}

.wa-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.wa-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Cuerpo del chat */
.wa-body {
    padding: 10px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column; /* 🚨 CLAVE: Apilar agentes verticalmente */
    gap: 10px; /* Espacio entre agentes */
}

/* Ítem de Agente */
.wa-agent-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    border: 1px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.wa-agent-item:hover {
    border-color: #25D366;
    transform: translateX(2px);
}

.wa-avatar {
    width: 40px;
    height: 40px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.wa-agent-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Apilar Nombre sobre Status */
}

.wa-name {
    font-weight: 600;
    font-size: 14px;
}

.wa-status {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.wa-arrow {
    color: #ccc;
    font-size: 18px;
}

/* Pie de página */
.wa-footer {
    text-align: center;
    font-size: 10px;
    color: #aaa;
    padding: 8px;
    background: white;
}