/* Agent Builder Floating Action Button */
.agent-builder-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #F37B20) 0%, #ff9d5c 100%);
    box-shadow: 0 4px 15px rgba(243, 123, 32, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pulse-fab 2s infinite;
}

.agent-builder-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(243, 123, 32, 0.6);
}

.fab-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.agent-builder-fab.hidden {
    display: none;
}

@keyframes pulse-fab {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 123, 32, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(243, 123, 32, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 123, 32, 0);
    }
}

/* Agent Builder Chat Widget */
.agent-builder-chat {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 420px;
    height: 550px;
    background-color: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease-out;
}

.agent-builder-chat.hidden {
    display: none;
}

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

.ab-chat-header {
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color, #F37B20) 0%, #d66412 100%);
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ab-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

.ab-close-btn:hover {
    opacity: 1;
}

.ab-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-body);
}

.ab-message {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ab-message.model-message {
    background-color: var(--bg-surface-hover, var(--bg-secondary));
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ab-message.user-message {
    background-color: var(--accent-color, #F37B20);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ab-message.error {
    background-color: #ff4444;
    color: white;
}

.ab-loading {
    opacity: 0.7;
    font-style: italic;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

.ab-chat-input-wrapper {
    padding: 10px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.ab-chat-input-wrapper textarea {
    flex: 1;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 10px 15px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    height: 72px;
    max-height: 120px;
    outline: none;
    line-height: 1.4;
}

.ab-chat-input-wrapper button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color, #F37B20);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.ab-chat-input-wrapper button:hover {
    background-color: #d66412;
}
