gateway/static/67_styles_workflow_files.css
2025-04-30 00:39:37 +02:00

464 lines
No EOL
8.2 KiB
CSS

/*
* PowerOn | Multi-Agent Service - Files Component Styles
* Styles for file upload, preview, and management
*/
/* File preview container */
.file-preview-container {
height: 100%;
display: flex;
flex-direction: column;
background-color: white;
}
.file-preview-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1rem;
background-color: #f8f9fa;
border-bottom: 1px solid #e5e7eb;
}
.file-preview-header h4 {
margin: 0;
}
.file-preview-actions {
display: flex;
gap: 0.5rem;
}
.file-preview-content {
flex: 1;
overflow: auto;
padding: 1rem;
}
/* File preview types */
.file-preview-image {
max-width: 100%;
margin: 0 auto;
display: block;
}
.file-preview-text {
white-space: pre-wrap;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 0.875rem;
overflow: auto;
padding: 0.5rem;
background-color: white;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
}
.file-preview-pdf {
width: 100%;
height: 100%;
min-height: 500px;
}
.file-preview-unsupported {
font-style: italic;
color: #6b7280;
margin-top: 1rem;
}
/* File information display */
.file-info {
text-align: center;
padding: 2rem;
}
.file-info h4 {
margin: 1rem 0 0.5rem;
}
.file-info p {
margin: 0.25rem 0;
color: #4b5563;
}
.file-actions {
display: flex;
align-items: center;
}
/* User input area for files */
.user-input-area {
padding: 1rem;
}
.user-input-container {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
#user-message-input {
width: 100%;
min-height: 80px;
max-height: 150px;
resize: vertical;
border: 1px solid #d1d5db;
border-radius: 0.25rem;
padding: 0.75rem;
font-family: inherit;
font-size: 0.875rem;
overflow-y: auto;
}
#user-message-input:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}
#user-message-input.awaiting-input {
border-color: #f59e0b;
box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}
.user-input-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Additional files container - improved visibility */
.additional-files-container {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 10px;
height: 100%;
overflow-y: auto;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
background-color: #f9fafb;
}
.additional-file-item {
background-color: white;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
padding: 8px 10px;
display: flex;
align-items: center;
font-size: 0.875rem;
}
.additional-file-item i {
margin-right: 10px;
color: #6b7280;
}
.file-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.remove-additional-file {
color: #ef4444;
cursor: pointer;
padding: 4px;
border-radius: 50%;
margin-left: 8px;
}
.remove-additional-file:hover {
background-color: #fee2e2;
}
/* File dropzone */
.file-dropzone-wrapper {
position: relative;
}
.file-dropzone-wrapper.dragging {
outline: 2px dashed #3b82f6;
background-color: rgba(59, 130, 246, 0.1);
}
.file-dropzone-wrapper.dragging::after {
content: "Drop files here";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(255, 255, 255, 0.9);
padding: 10px 15px;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
z-index: 10;
font-weight: bold;
color: #2196F3;
}
/* Selected files preview - improved visibility */
.selected-files-preview {
margin: 8px 0 12px 0;
background-color: #f0f9ff; /* Light blue background for better visibility */
border: 1px solid #93c5fd; /* Blue border */
border-radius: 0.25rem;
padding: 8px;
display: block; /* Ensure it's visible */
width: 100%;
}
.files-preview-header {
font-size: 0.75rem;
font-weight: 600; /* Slightly bolder */
color: #3b82f6; /* Blue text to match border */
margin-bottom: 8px;
}
.files-preview-list {
list-style: none;
padding: 0;
margin: 0;
}
.file-preview-item {
display: flex;
align-items: center;
padding: 6px 8px;
background-color: white;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
margin-bottom: 6px;
font-size: 0.8rem;
}
.file-preview-item:last-child {
margin-bottom: 0;
}
.file-preview-item i {
margin-right: 8px;
color: #6b7280;
}
.file-preview-item span {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.remove-file-btn {
color: #ef4444;
background: none;
border: none;
padding: 4px;
cursor: pointer;
transition: background-color 0.2s;
border-radius: 50%;
}
.remove-file-btn:hover {
background-color: #fee2e2;
}
/* No files message */
.no-files-message {
color: #6b7280;
font-style: italic;
text-align: center;
padding: 20px;
}
/* Loading states */
.loading-preview {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
color: #6b7280;
}
.loading-preview i {
font-size: 2rem;
margin-bottom: 0.5rem;
}
/* Error states */
.error-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
color: #6b7280;
text-align: center;
}
.error-state i {
font-size: 3rem;
color: #ef4444;
margin-bottom: 1rem;
}
.error-state h4 {
margin: 0 0 0.5rem 0;
color: #111827;
}
.error-state p {
margin: 0;
color: #6b7280;
}
/* Animation */
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
}
70% {
box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
}
}
.pulse-attention {
animation: pulse 2s infinite;
}
/* Formatted preview */
.formatted-preview {
padding: 15px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.6;
color: #333;
overflow: auto;
}
.formatted-preview code {
font-family: 'Courier New', Courier, monospace;
background-color: #f5f5f5;
padding: 2px 4px;
border-radius: 3px;
font-size: 0.9em;
color: #d63384;
}
.formatted-preview pre {
background-color: #f8f8f8;
border: 1px solid #ddd;
border-radius: 4px;
padding: 10px;
overflow: auto;
margin: 10px 0;
}
.formatted-preview pre code {
background-color: transparent;
padding: 0;
color: #333;
font-size: 0.9em;
white-space: pre;
}
.formatted-preview h1,
.formatted-preview h2,
.formatted-preview h3 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
.formatted-preview h1 {
font-size: 1.5em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
}
.formatted-preview h2 {
font-size: 1.25em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
}
.formatted-preview h3 {
font-size: 1em;
}
.formatted-preview ul,
.formatted-preview ol {
padding-left: 2em;
margin-top: 0;
margin-bottom: 16px;
}
.formatted-preview li + li {
margin-top: 0.25em;
}
.formatted-preview table {
border-collapse: collapse;
width: 100%;
margin: 16px 0;
}
.formatted-preview table th,
.formatted-preview table td {
border: 1px solid #ddd;
padding: 6px 13px;
}
.formatted-preview table tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}
.formatted-preview table tr:nth-child(2n) {
background-color: #f6f8fa;
}
.formatted-preview table th {
background-color: #f6f8fa;
font-weight: 600;
}
/* Copy notification */
.copy-notification {
position: absolute;
top: 20px;
right: 20px;
background-color: #10b981;
color: white;
padding: 0.5rem 1rem;
border-radius: 0.25rem;
animation: fadeIn 0.3s ease, fadeOut 0.5s ease 1.5s forwards;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
from { opacity: 1; transform: translateY(0); }
to { opacity: 0; transform: translateY(-10px); }
}
.additional-files-container {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 10px;
height: 100%;
max-height: 200px; /* Add this */
overflow-y: auto; /* Change from 'auto' to 'auto' */
overflow-x: hidden; /* Add this to prevent horizontal scrollbar */
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
background-color: #f9fafb;
}