/* Icono flotante */
#wa-widget-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

#wa-boton-flotante {
    width: 60px;
    height: 60px;
    background: var(--wa-color-fondo, #25d366);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: waEntrada 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes waEntrada {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

#wa-boton-flotante:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transform: scale(1.05);
}

#wa-boton-flotante:active {
    transform: scale(0.95);
}

/* Efecto de pulso */
@keyframes waPulse {
    0% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 10px rgba(37, 211, 102, 0.3);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
}

#wa-boton-flotante.wa-pulse {
    animation: waPulse 2s infinite;
}

#wa-chat-ventana {
    position: fixed;
    bottom: 94px;
    right: 24px;
    width: 340px;
    max-width: 95vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: none;
    flex-direction: column;
    z-index: 10000;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wa-chat-ventana.wa-abierto {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

.wa-chat-header {
    background: #075e54;
    color: #fff;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wa-chat-header img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
}

.wa-chat-header .wa-header-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.wa-chat-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.wa-chat-header button:hover {
    opacity: 0.8;
}

.wa-agentes-lista {
    padding: 0;
    margin: 0;
    list-style: none;
    background: #f0f0f0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.8) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.6) 0%, transparent 50%);
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.wa-agente-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    transition: all 0.2s ease;
    margin: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wa-agente-item:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wa-agente-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
    border: 2px solid var(--wa-color-fondo, #25d366);
    transition: transform 0.2s ease;
}

.wa-agente-item:hover .wa-agente-img {
    transform: scale(1.05);
}

.wa-agente-info {
    flex: 1;
}

.wa-agente-nombre {
    font-weight: bold;
    font-size: 16px;
    color: #222;
    margin-bottom: 4px;
}

.wa-agente-contacto {
    margin-top: 4px;
}

.wa-agente-contacto a {
    background: var(--wa-color-fondo, #25d366);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.wa-agente-contacto a:hover {
    background: #128c7e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Scrollbar personalizado */
.wa-agentes-lista::-webkit-scrollbar {
    width: 6px;
}

.wa-agentes-lista::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wa-agentes-lista::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.wa-agentes-lista::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    #wa-chat-ventana {
        width: calc(100vw - 48px);
        right: 24px;
        left: 24px;
        max-width: none;
    }
    
    #wa-boton-flotante {
        width: 56px;
        height: 56px;
    }
} 