315 lines
7.8 KiB
CSS
315 lines
7.8 KiB
CSS
/* --- Базовые настройки --- */
|
||
body {
|
||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||
background-color: #1e1e1e;
|
||
color: #d4d4d4;
|
||
margin: 0;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* --- Главный контейнер --- */
|
||
.app-container {
|
||
display: flex;
|
||
height: 100%;
|
||
width: 100%;
|
||
}
|
||
|
||
/* --- Сайдбар (450px) --- */
|
||
.sidebar {
|
||
width: 450px;
|
||
min-width: 450px;
|
||
background-color: #202123;
|
||
display: flex;
|
||
flex-direction: column;
|
||
border-right: 1px solid #3e3e42;
|
||
transition: width 0.3s ease;
|
||
position: relative;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* Состояние: Скрыто */
|
||
.sidebar.collapsed {
|
||
width: 40px;
|
||
min-width: 40px;
|
||
overflow: visible;
|
||
}
|
||
|
||
/* Контейнер содержимого */
|
||
.sidebar-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
width: 450px;
|
||
transition: opacity 0.2s, width 0.2s;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* Скрываем контент, когда сайдбар свернут */
|
||
.sidebar.collapsed .sidebar-content {
|
||
opacity: 0;
|
||
width: 0;
|
||
visibility: hidden;
|
||
}
|
||
|
||
/* Кнопка сворачивания */
|
||
.sidebar-toggle-header {
|
||
height: 50px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end; /* Кнопка справа */
|
||
padding-right: 15px;
|
||
padding-left: 15px;
|
||
border-bottom: 1px solid #3e3e42;
|
||
z-index: 10;
|
||
width: 450px;
|
||
transition: width 0.3s ease;
|
||
}
|
||
|
||
/* Центрируем кнопку, когда свернуто */
|
||
.sidebar.collapsed .sidebar-toggle-header {
|
||
justify-content: center;
|
||
padding-right: 0;
|
||
padding-left: 0;
|
||
width: 40px;
|
||
}
|
||
|
||
.toggle-btn {
|
||
background-color: #3e3e42;
|
||
border: 1px solid #555;
|
||
color: white;
|
||
width: 30px;
|
||
height: 30px;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 1.2rem;
|
||
}
|
||
.toggle-btn:hover { background-color: #555; }
|
||
|
||
.sidebar-header { padding: 15px; }
|
||
|
||
.new-chat-btn {
|
||
width: 100%;
|
||
padding: 12px;
|
||
background-color: #3e3e42;
|
||
border: 1px solid #555;
|
||
color: white;
|
||
border-radius: 6px;
|
||
cursor: pointer;
|
||
text-align: left;
|
||
font-size: 0.9rem;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
transition: background 0.2s;
|
||
}
|
||
.new-chat-btn:hover { background-color: #4e4e52; }
|
||
|
||
.chat-list {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 10px;
|
||
}
|
||
|
||
.chat-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 12px;
|
||
margin-bottom: 5px;
|
||
border-radius: 6px;
|
||
cursor: pointer;
|
||
color: #ccc;
|
||
font-size: 0.9rem;
|
||
}
|
||
.chat-item:hover { background-color: #2d2d30; }
|
||
.chat-item.active { background-color: #0e639c; color: white; }
|
||
|
||
/* Стиль редактирования названия чата */
|
||
.chat-title.editing {
|
||
background-color: #3e3e42;
|
||
border: 1px solid #007acc;
|
||
padding: 2px 5px;
|
||
border-radius: 3px;
|
||
color: #fff;
|
||
outline: none;
|
||
}
|
||
|
||
.sidebar-footer {
|
||
padding: 15px;
|
||
border-top: 1px solid #3e3e42;
|
||
}
|
||
.sidebar-footer-btn {
|
||
width: 100%;
|
||
padding: 10px;
|
||
background-color: transparent;
|
||
border: 1px solid #555;
|
||
color: #d4d4d4;
|
||
cursor: pointer;
|
||
border-radius: 4px;
|
||
}
|
||
.sidebar-footer-btn:hover { background-color: #333; }
|
||
|
||
/* --- Основная Область (Flex: 1) --- */
|
||
.main-area {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background-color: #252526;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* --- Шапка (Фикс выравнивания) --- */
|
||
.main-header {
|
||
background-color: #2d2d30;
|
||
padding: 15px 20px;
|
||
border-bottom: 1px solid #3e3e42;
|
||
display: flex;
|
||
justify-content: space-between; /* Левая группа - слева, Правая - справа */
|
||
align-items: flex-start; /* Выравнивание по верху */
|
||
gap: 20px;
|
||
flex-wrap: wrap;
|
||
flex-shrink: 0; /* Не сжимать шапку */
|
||
}
|
||
|
||
.header-left {
|
||
display: flex;
|
||
gap: 15px;
|
||
align-items: flex-start; /* Логотип и текст прижаты к верху */
|
||
}
|
||
|
||
.logo-container {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
.logo-img { width: 32px; height: 32px; border-radius: 50%; }
|
||
|
||
.titles {
|
||
display: flex;
|
||
flex-direction: column; /* Заголовок и статус друг под другом */
|
||
}
|
||
.header-left h1 {
|
||
margin: 0;
|
||
font-size: 1.1rem;
|
||
color: #fff;
|
||
line-height: 1.2;
|
||
}
|
||
.status-indicator {
|
||
font-size: 0.8rem;
|
||
margin-top: 4px; /* Фиксированный отступ */
|
||
color: #4ec9b0;
|
||
line-height: 1;
|
||
}
|
||
|
||
/* --- Панель управления моделью --- */
|
||
.model-controls {
|
||
display: flex;
|
||
gap: 10px; /* ФИКСИРОВАННОЕ расстояние между инпутом и кнопками */
|
||
align-items: center;
|
||
flex-shrink: 0; /* Запрет сжатия этой группы */
|
||
}
|
||
|
||
.input-wrapper {
|
||
position: relative;
|
||
width: 300px; /* ФИКСИРОВАННАЯ ширина */
|
||
flex-shrink: 0; /* Запрет сжатия инпута */
|
||
}
|
||
#global-model-input {
|
||
width: 100%;
|
||
background-color: #3e3e42;
|
||
border: 1px solid #555;
|
||
color: #fff;
|
||
padding: 8px 10px;
|
||
border-radius: 4px;
|
||
font-size: 0.85rem;
|
||
box-sizing: border-box; /* Чтобы padding не ломал ширину */
|
||
}
|
||
#global-model-input:focus {
|
||
border-color: #007acc;
|
||
outline: none;
|
||
}
|
||
|
||
/* --- Контент (Чат + Инпут) --- */
|
||
.content-area {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.chat-window {
|
||
flex: 1;
|
||
padding: 20px;
|
||
overflow-y: auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 15px;
|
||
}
|
||
|
||
.message {
|
||
padding: 10px 15px;
|
||
border-radius: 8px;
|
||
max-width: 70%;
|
||
line-height: 1.5;
|
||
word-wrap: break-word;
|
||
}
|
||
.message.user { align-self: flex-end; background-color: #0e639c; color: white; }
|
||
.message.bot { align-self: flex-start; background-color: #3e3e42; }
|
||
.message.system { align-self: center; font-size: 0.8rem; color: #888; }
|
||
|
||
.input-area {
|
||
padding: 20px;
|
||
border-top: 1px solid #3e3e42;
|
||
display: flex;
|
||
gap: 10px;
|
||
background-color: #2d2d30;
|
||
flex-shrink: 0;
|
||
}
|
||
#global-input {
|
||
flex: 1;
|
||
background-color: #1e1e1e;
|
||
border: 1px solid #3e3e42;
|
||
color: white;
|
||
padding: 10px;
|
||
border-radius: 4px;
|
||
resize: none;
|
||
outline: none;
|
||
font-family: inherit;
|
||
}
|
||
#global-input:focus { border-color: #007acc; }
|
||
#global-input:disabled { background-color: #333; cursor: not-allowed; }
|
||
|
||
/* --- Кнопки --- */
|
||
.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
|
||
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
||
.btn-primary { background-color: #0e639c; color: white; }
|
||
.btn-secondary { background-color: #cca511; color: #111; }
|
||
.btn-danger-sm { background-color: #ce4e4e; color: white; padding: 4px 12px; font-size: 0.8rem; }
|
||
|
||
/* --- Автодополнение --- */
|
||
.suggestions-list {
|
||
position: absolute;
|
||
top: 100%; left: 0; width: 100%;
|
||
background-color: #2d2d30;
|
||
border: 1px solid #3e3e42;
|
||
max-height: 200px;
|
||
overflow-y: auto;
|
||
z-index: 100;
|
||
box-shadow: 0 4px 6px rgba(0,0,0,0.3);
|
||
}
|
||
.suggestion-item { padding: 8px 12px; cursor: pointer; color: #ccc; border-bottom: 1px solid #3e3e42; }
|
||
.suggestion-item:hover { background-color: #0e639c; color: white; }
|
||
|
||
/* --- Лоадер --- */
|
||
.loader span { display: inline-block; width: 6px; height: 6px; background-color: #fff; border-radius: 50%; margin: 0 2px; animation: bounce 1.4s infinite ease-in-out both; }
|
||
.loader span:nth-child(1) { animation-delay: -0.32s; }
|
||
.loader span:nth-child(2) { animation-delay: -0.16s; }
|
||
@keyframes bounce {
|
||
0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
|
||
40% { transform: scale(1); opacity: 1; }
|
||
|
||
} |