/* Styles for AI Iterative Chat UI */

.iterative-chat-card {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.code-display {
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    tab-size: 4;
}

.metadata-display {
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 10px;
    max-width: 85%;
    clear: both;
}

.user-message {
    align-self: flex-end;
}

.assistant-message, .system-message {
    align-self: flex-start;
}

.message-content {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-break: break-word;
}

.system-content {
    background-color: var(--background-color, #f8f9fa);
    color: var(--text-secondary, #6c757d);
    font-style: italic;
    border: 1px solid var(--border-color, #e9ecef);
}

.user-content {
    background-color: var(--primary-color, #007bff);
    color: white;
}

.assistant-content {
    background-color: var(--background-color, #f1f3f5);
    color: var(--text-color, #212529);
    border: 1px solid var(--border-color, #e9ecef);
}

.metadata-toggle {
    cursor: pointer;
    color: var(--text-secondary, #6c757d);
    font-size: 0.9rem;
}

.metadata-toggle:hover {
    color: var(--text-color, #343a40);
}

.thinking-indicator {
    color: var(--text-secondary, #6c757d);
    font-size: 0.9rem;
}

.iteration-counter {
    display: inline-block;
    padding: 0 8px;
    font-size: 0.9rem;
}

/* Styles for suggested prompts */
.suggested-prompts {
    gap: 5px;
}

.copy-btn {
    font-size: 0.8rem;
}

/* Attachment-related styles */
.discussion-attach-btn {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.375rem 0.75rem;
    margin-right: 0.5rem;
    border-radius: 0.25rem;
}

.discussion-attach-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.attachment-zone {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.attached-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attached-file {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.attached-file .file-icon {
    margin-right: 0.5rem;
    color: #6c757d;
}

.attached-file .file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attached-file .file-size {
    color: #6c757d;
    font-size: 0.75rem;
}

.attached-file .remove-btn {
    margin-left: 0.5rem;
    cursor: pointer;
    color: #dc3545;
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.attached-file .remove-btn:hover {
    color: #a71d2a;
}

.discussion-input-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

/* Drag and drop styles */
.attachment-zone.dragover {
    background-color: #e7f3ff;
    border: 2px dashed #007bff;
}

.chat-scroll-container.drag-over {
    position: relative;
}

.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    border: 3px dashed #007bff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.drag-message {
    background: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    color: #007bff;
    font-weight: 500;
}

/* Upload progress styles */
.upload-progress {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.upload-progress-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-filename {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.upload-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: #007bff;
    width: 0;
    transition: width 0.3s ease;
}

.upload-status {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Image upload file types */
.attached-file[data-type="image"] .file-icon {
    color: #28a745;
}

.attached-file[data-type="pdf"] .file-icon {
    color: #dc3545;
}

.attached-file[data-type="excel"] .file-icon,
.attached-file[data-type="csv"] .file-icon {
    color: #28a745;
}

.attached-file[data-type="word"] .file-icon {
    color: #007bff;
}

.attached-file[data-type="code"] .file-icon {
    color: #6f42c1;
}