/* AI Command Bar - AutoCAD-style Bottom Interface */

/* Command Bar Container */
.command-bar {
    position: relative;
    background: var(--bg-primary);
    border-top: 2px solid var(--border-color);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    transition: height 0.2s ease;
    flex-shrink: 0;
}

.command-bar.collapsed .command-bar-history {
    display: none;
}

.command-bar.collapsed .command-bar-header .command-bar-btn svg {
    transform: rotate(180deg);
}

/* Header Row */
.command-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    min-height: 28px;
}

.command-bar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-bar-icon {
    width: 14px;
    height: 14px;
    stroke: var(--accent-primary);
}

.command-bar-actions {
    display: flex;
    gap: 4px;
}

.command-bar-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
}

.command-bar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.command-bar-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

/* Model Selector */
.command-bar-model-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--text-secondary);
    font-size: 10px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, color 0.15s;
}

.command-bar-model-select:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.command-bar-model-select:focus {
    border-color: var(--accent-primary);
}

.command-bar-model-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* History/Messages Area */
.command-bar-history {
    max-height: 120px;
    overflow-y: auto;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    font-size: 12px;
    line-height: 1.5;
}

.command-bar-history:focus {
    outline: none;
}

.command-bar-history:empty::before {
    content: 'Type a command or describe a polygon to create. Examples: "(100,100), (200,100), (200,200)" or "N 45 E for 100 ft"';
    color: var(--text-tertiary);
    font-style: italic;
}

/* Message Styles */
.plat-chat-message {
    padding: 2px 0;
    word-wrap: break-word;
}

.plat-chat-message.user {
    color: var(--accent-primary);
}

.plat-chat-message.user::before {
    content: '> ';
    color: var(--text-secondary);
}

.plat-chat-message.assistant {
    color: var(--text-primary);
}

.plat-chat-message.assistant::before {
    content: '  ';
}

.plat-chat-message.error {
    color: var(--accent-danger);
}

.plat-chat-message.error::before {
    content: '! ';
}

.plat-chat-message.system {
    color: var(--text-tertiary);
    font-style: italic;
}

.plat-chat-message.system::before {
    content: '* ';
}

/* Loading Indicator */
.plat-chat-loading {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    color: var(--text-secondary);
}

.plat-chat-loading dotlottie-player {
    flex-shrink: 0;
}

/* Input Row */
.command-bar-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

.command-input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    resize: none;
    min-height: 24px;
    max-height: 60px;
    outline: none;
    transition: border-color 0.15s;
}

.command-input:focus {
    border-color: var(--accent-primary);
}

.command-input::placeholder {
    color: var(--text-tertiary);
}

.command-send-btn {
    background: var(--accent-primary);
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.command-send-btn:hover:not(:disabled) {
    background: var(--accent-primary-hover);
}

.command-send-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
}

.command-send-btn svg {
    width: 14px;
    height: 14px;
}

.command-stop-btn {
    background: var(--accent-danger, #e74c3c);
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.command-stop-btn:hover {
    background: #c0392b;
}

.command-stop-btn svg {
    width: 14px;
    height: 14px;
}

/* Welcome Message (shown in empty state) */
.plat-chat-welcome {
    color: var(--text-tertiary);
    font-style: italic;
    padding: 4px 0;
}

.plat-chat-welcome-icon,
.plat-chat-welcome-title,
.plat-chat-welcome-text,
.plat-chat-welcome-examples {
    display: none;
}

/* Scrollbar Styles */
.command-bar-history::-webkit-scrollbar {
    width: 6px;
}

.command-bar-history::-webkit-scrollbar-track {
    background: transparent;
}

.command-bar-history::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.command-bar-history::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Status Bar */
.status-bar {
    position: relative;
    height: 28px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
}

.status-bar-left,
.status-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-item {
    color: var(--text-secondary);
    white-space: nowrap;
}

.status-bar .server-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
}

.status-bar .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.status-bar .server-status.connected .status-dot {
    background: #27ae60;
}

.status-bar .server-status.disconnected .status-dot {
    background: #e74c3c;
}

/* No additional positioning needed - elements flow naturally */
