/* Contenedor principal para que no se mueva */
#wpmw-main-container {
    position: fixed;
    bottom: 100px; /* Ajusta esto según la altura de tu icono del bot actual */
    right: 20px;
    z-index: 999999; /* Siempre por encima de todo */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* El botón circular de WhatsApp */
#wpmw-trigger {
    background-color: #25d366;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#wpmw-trigger:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

#wpmw-trigger img {
    width: 35px;
    height: 35px;
}

/* La lista de agentes que aparece al hacer clic */
#wpmw-agents-list {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 250px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Clase activa para mostrar la lista con animación */
#wpmw-agents-list.wpmw-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Encabezado del popup */
.wpmw-header {
    background: #075e54;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* Estilo de cada agente/asesor */
.wpmw-agent-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.wpmw-agent-item:hover {
    background: #f9f9f9;
}

.wpmw-agent-item:last-child {
    border-bottom: none;
}

.agent-name {
    font-size: 14px;
    font-weight: 500;
}

/* Indicador de "Online" */
.wpmw-agent-item::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #25d366;
    border-radius: 50%;
    margin-right: 12px;
}

/* ==========================================================================
   LÓGICA DE POSICIONES DINÁMICAS (Para que el botón obedezca al Admin)
   ========================================================================== */

/* 1. Reset base: Quitamos los márgenes fijos para que las clases manden */
#wpmw-main-container {
    position: fixed !important;
    bottom: 20px !important;
    right: auto;
    left: auto;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* 2. SI ELIGES DERECHA (Bottom Right) */
#wpmw-main-container.bottom-right {
    right: 20px !important;
    left: auto !important;
    align-items: flex-end;
}

/* 3. SI ELIGES IZQUIERDA (Bottom Left) - ¡Esta es la que necesitas! */
#wpmw-main-container.bottom-left {
    left: 20px !important;
    right: auto !important;
    align-items: flex-start;
}

/* 4. SI ELIGES CENTRO (Bottom Center) */
#wpmw-main-container.bottom-center {
    left: 50% !important;
    transform: translateX(-50%);
    align-items: center;
}

/* AJUSTE PARA LA LISTA DE AGENTES */
/* Hacemos que la lista siempre salga hacia arriba del icono */
#wpmw-agents-list {
    bottom: 70px;
    position: absolute;
    width: 250px;
}

/* Si está a la izquierda, que la lista se alinee a la izquierda */
.bottom-left #wpmw-agents-list {
    left: 0;
}

/* Si está a la derecha, que la lista se alinee a la derecha */
.bottom-right #wpmw-agents-list {
    right: 0;
}