.agent-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 4px;
}

.agent-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

.agent-item.active {
    background: rgba(var(--accent-rgb), 0.2);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.agent-avatar {
    background: linear-gradient(135deg, #9333ea, #2383e2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.agent-emoji {
    font-size: 16px;
}

.agent-online {
    background-color: #9333ea !important;
    box-shadow: 0 0 8px rgba(147, 51, 234, 0.6);
}

.agent-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agent-badge {
    font-size: 9px;
    font-weight: 800;
    color: white;
    background: #9333ea;
    padding: 1px 4px;
    border-radius: 4px;
    width: fit-content;
    letter-spacing: 0.5px;
}

/* Agent Chat Overlay */
.agent-chat-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: 350px;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.agent-chat-header {
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.agent-chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.agent-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agent-msg {
    display: flex;
    max-width: 85%;
}

.agent-msg.user {
    align-self: flex-end;
}

.agent-msg.agent {
    align-self: flex-start;
}

.agent-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.agent-msg.user .agent-msg-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 2px;
}

.agent-msg.agent .agent-msg-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.agent-chat-input-area {
    padding: 16px;
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.1);
}

.agent-chat-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    outline: none;
}

.agent-chat-input:focus {
    border-color: var(--accent);
}

.agent-chat-send {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.1s;
}

.agent-chat-send:active {
    transform: scale(0.95);
}

/* Thinking animation */
.thinking-dots {
    display: flex;
    gap: 3px;
    padding: 8px 15px;
    min-height: 20px;
    align-items: center;
}

.thinking-dots span {
    animation: thinking-fade 1.4s infinite;
    font-weight: bold;
    font-size: 24px;
    line-height: 0;
    color: var(--text-secondary);
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking-fade {
    0% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 0.2; transform: translateY(0); }
}
