﻿:root {
--primary-color: #7c5fe3;
--secondary-color: #f8f9fa;
--background-color: #ffffff;
--surface-color: #f8f9fa;
--text-color: #212529;
--border-color: #dee2e6;
--sidebar-width: 260px;
--transition-speed: 0.2s;
--message-max-width: 85%;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
--radius: 35px;
--user-message-bg: #7c5fe3;
--assistant-message-bg: #f8f9fa;
--input-bg: #ffffff;
--code-bg: rgba(0, 0, 0, 0.05);
--quick-question-bg: #e9ecef;
--scrollbar-thumb: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] {
--primary-color: #7c5fe3;
--secondary-color: #17151b;
--background-color: #0f0e11;
--surface-color: #17151b;
--text-color: #e2e0e7;
--border-color: #312e37;
--user-message-bg: #7c5fe3;
--assistant-message-bg: #2b2830;
--input-bg: #1a181e;
--code-bg: rgba(255, 255, 255, 0.08);
--quick-question-bg: #2b2830;
--scrollbar-thumb: rgba(255, 255, 255, 0.2);
}

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
font-family: 'Work Sans', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.6;
transition: background-color var(--transition-speed), color var(--transition-speed);
}

.app-container {
display: flex;
height: 100vh;
overflow: hidden;
}

.sidebar {
    position: fixed;
    left: 0; /* фиксируем слева */
    top: 0;
    height: 100%;
    z-index: 999;
    width: 200px; /* полная ширина с текстом */
}


    .sidebar:not(.open)  .sidebar-header,
    .sidebar:not(.open)  .chat-history-item {
        align-items: center;
        justify-items: center;
    }
 

/* Блок с текстом, который будет скрываться */
.sidebar .text-content {
    overflow: hidden;
    white-space: nowrap;
    transition: width var(--transition-speed);
    width: 140px; /* ширина текста при открытом sidebar */
    margin-left: 10px;
}

/* Закрытое состояние */
    .sidebar:not(.open) .text-content,
    .sidebar:not(.open) .chat-block {
        display: none;
    }
     

/* Сам sidebar можно смещать на минимум ширины иконок */
    .sidebar.closed {
        width: 100px; /* ширина только иконок */
        transform: translateX(0);
    }

.sidebar.open {
    transform: translateX(0);
}

.sidebar {
width: var(--sidebar-width);
background-color: var(--surface-color);
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
transition: all var(--transition-speed);
overflow: hidden;
}

.sidebar-header {
margin-top: 6.5em;
padding: 1rem; 
}

.new-chat-btn {
width: 100%;
padding: 0.75rem;
background: transparent;
justify-content: left; 
color: white;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
transition: background-color var(--transition-speed);
font-family: 'Heebo', sans-serif;
}

.new-chat-btn:hover {
    background-color: #8768f8;
}

.chat-history {
flex: 1;
overflow-y: auto;
padding: 0.5rem;
}

.chat-history::-webkit-scrollbar {
    width: 6px;
}

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

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

[data-bs-theme="dark"] .chat-history::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
}

.chat-history-item {
padding: 0.75rem;
margin-bottom: 0.25rem;
border-radius: var(--radius);
cursor: pointer;
display: flex;
align-items: center;
gap: 0.75rem;
transition: background-color var(--transition-speed);
border: 1px solid transparent;
color: var(--text-color);
}

.chat-history-item:hover {
    background-color: rgba(124, 95, 227, 0.1);
}

.chat-history-item.active {
    background-color: rgba(124, 95, 227, 0.15);
    border-color: var(--primary-color);
}

[data-bs-theme="dark"] .chat-history-item:hover,
[data-bs-theme="dark"] .chat-history-item.active {
background-color: #292434;
}

.chat-history-item-icon {
color: var(--primary-color);
}

.chat-history-item-title {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-family: 'Heebo', sans-serif;
font-size: 0.9rem;
color: var(--text-color);
}

.sidebar-footer {
padding: 1rem;
border-top: 1px solid var(--border-color);
background-color: var(--surface-color);
}

.user-menu {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem;
border-radius: var(--radius);
cursor: pointer;
transition: background-color var(--transition-speed);
color: var(--text-color);
}

.user-menu:hover {
    background-color: rgba(124, 95, 227, 0.1);
}

.user-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background-color: var(--primary-color);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
}

.user-info {
flex: 1;
}

.user-name {
font-weight: 500;
font-family: 'Heebo', sans-serif;
font-size: 0.9rem;
color: var(--text-color);
}

.user-email {
font-size: 0.75rem;
color: #6c757d;
}

[data-bs-theme="dark"] .user-email {
color: #a0a0a0;
}

.main-chat {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background-color: var(--background-color);
}

.chat-header {
margin-top: 100px;
padding: 1rem;
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
justify-content: space-between;
background-color: var(--surface-color);
}

.chat-title {
display: flex;
align-items: center;
gap: 0.75rem;
}

.chat-title-icon {
color: #4D04DE;
}

.chat-title-text {
font-weight: 500;
font-family: 'Heebo', sans-serif;
color: var(--text-color);
}

.chat-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}

.chat-action-btn {
background: var(--surface-color);
border: 1px solid var(--border-color);
color: var(--text-color);
padding: 0.5rem 0.75rem;
border-radius: var(--radius);
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
transition: background-color var(--transition-speed), border-color var(--transition-speed);
font-family: 'Heebo', sans-serif;
font-size: 0.8rem;
}

.chat-action-btn:hover {
    background-color: rgba(124, 95, 227, 0.1);
    border-color: var(--primary-color);
}

.model-selector {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-color);
}

.model-selector select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: 'Heebo', sans-serif;
}

    .model-selector select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

.chat-messages {
flex: 1;
overflow-y: auto;
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
max-width: 900px;
margin: 0 auto;
width: 100%;
background-color: var(--background-color);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

[data-bs-theme="dark"] .chat-messages::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
}

@keyframes fadeIn {
from {
    opacity: 0;
    transform: translateY(10px);
}

to {
    opacity: 1;
    transform: translateY(0);
}
}

.message {
display: flex;
gap: 1rem;
max-width: 100%;
animation: fadeIn 0.3s ease-in-out;
}

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

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

.message-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
font-size: 0.8rem;
font-weight: 600;
border: 2px solid transparent;
}

.message-avatar.user {
    background-color: var(--user-message-bg);
    color: white;
    border-color: var(--user-message-bg);
}

.message-avatar.system {
    /*background: linear-gradient(135deg, #7c5fe3, #8768f8);*/
    color: #4D04DE;
    border-color: transparent;
}

.message-content {
padding: 1rem 1.25rem;
border-radius: var(--radius);
overflow: auto;
position: relative;
font-size: 0.95rem;
line-height: 1.6;
max-width: calc(100% - 48px);
box-shadow: var(--shadow-sm);
border: 1px solid transparent;
word-wrap: break-word;
overflow-wrap: break-word;
}

.message.user .message-content {
background-color: #4E3089;
color: white;
border-bottom-right-radius: 4px;
}

.message.system .message-content {
background-color: #37343D;
border: 1px solid var(--border-color);
border-bottom-left-radius: 4px;
color: var(--text-color);
}

.message-actions {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
justify-content: flex-end;
opacity: 0;
transition: opacity var(--transition-speed);
}

.message:hover .message-actions {
opacity: 1;
}

.message-action-btn {
background: none;
border: none;
color: #6c757d;
cursor: pointer;
padding: 0.25rem 0.5rem;
border-radius: 4px;
transition: background-color var(--transition-speed), color var(--transition-speed);
font-size: 0.8rem;
display: flex;
align-items: center;
gap: 0.25rem;
}

.message-action-btn:hover {
    background-color: rgba(124, 95, 227, 0.1);
    color: var(--text-color);
}

.message.user .message-action-btn {
color: rgba(255, 255, 255, 0.7);
}

.message.user .message-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.typing-indicator {
display: flex;
gap: 0.25rem;
padding: 0.5rem 0;
}

.typing-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #6c757d;
}

[data-bs-theme="dark"] .typing-dot {
background-color: #a0a0a0;
}

.typing-dot:nth-child(1) {
animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
animation: typing 1.4s infinite;
animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
animation: typing 1.4s infinite;
animation-delay: 0.4s;
}

@keyframes typing {
0%, 60%, 100% {
    transform: translateY(0);
}

30% {
    transform: translateY(-5px);
}
}

.quick-questions-container {
padding: 1rem;
border-top: 1px solid var(--border-color);
background-color: var(--surface-color);
}

.quick-questions {
max-width: 800px;
margin: 0 auto;
}

.quick-questions-title {
font-size: 0.8rem;
color: #6c757d;
margin-bottom: 0.75rem;
font-weight: 500;
font-family: 'Heebo', sans-serif;
text-transform: uppercase;
letter-spacing: 0.5px;
}

[data-bs-theme="dark"] .quick-questions-title {
color: #a0a0a0;
}

.quick-questions-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}

.quick-question-btn {
background-color: var(--quick-question-bg);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 0.5rem 0.75rem;
font-size: 0.8rem;
cursor: pointer;
transition: all var(--transition-speed);
color: var(--text-color);
text-align: left;
animation: fadeIn 0.3s ease-in-out;
animation-fill-mode: both;
font-family: 'Heebo', sans-serif;
}

.quick-question-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.quick-question-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.quick-question-btn:nth-child(3) {
    animation-delay: 0.3s;
}

.quick-question-btn:nth-child(4) {
    animation-delay: 0.4s;
}

.quick-question-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.chat-input-wrapper {
display: flex;
gap: 0.75rem;
align-items: flex-end;
max-width: 800px;
margin: 0 auto;
}
.text-chat-input {
background-color:transparent;
border:none;
resize:none;

}
.text-chat-input:focus {
outline: none;
border: none;
}
.chat-input {
    flex: 1;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: border-color var(--transition-speed);
}

    .chat-input:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .chat-input::placeholder {
        color: #6c757d;
    }

[data-bs-theme="dark"] .chat-input::placeholder {
    color: #a0a0a0;
}
.round-btn {
font-size: 0.9rem;
cursor: pointer;
border-radius: 50%;
padding: 0.6em;
background: transparent;
border: none;
}
.chat-send-btn {
    background-color: transparent;
    color: #78949d;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    font-size: 0.9rem;
}
[data-bs-theme="dark"]
.chat-send-btn {
    color: white
}
    .chat-send-btn:hover {
        background-color: #e5e5e5;
        
    }
[data-bs-theme="dark"]
.chat-send-btn:hover {
    background-color: #211e27;
}

.chat-send-btn:disabled { 
    cursor: not-allowed;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 7rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

    .theme-toggle:hover {
        background-color: rgba(124, 95, 227, 0.1);
    }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

[data-bs-theme="dark"] .loading-overlay {
    background-color: rgba(15, 14, 17, 0.8);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(124, 95, 227, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.message-content pre {
    background-color: var(--code-bg);
    padding: 0.75rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    position: relative;
    border: 1px solid var(--border-color);
}

.message-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: var(--code-bg);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-size: 0.85em;
}

.message-content pre code {
    background-color: transparent;
    padding: 0;
}

.code-block {
    position: relative;
    margin: 0.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--code-bg);
    border-bottom: 1px solid var(--border-color);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-color);
}

.copy-code-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color var(--transition-speed);
}

    .copy-code-btn:hover {
        background-color: rgba(124, 95, 227, 0.2);
    }

.code-content {
    padding: 0.75rem;
    overflow-x: auto;
    background-color: var(--code-bg);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

[data-bs-theme="dark"] .empty-state-icon {
    color: #a0a0a0;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-family: 'Heebo', sans-serif;
    color: var(--text-color);
}

.empty-state-description {
    color: #6c757d;
    max-width: 400px;
    font-size: 0.9rem;
}

[data-bs-theme="dark"] .empty-state-description {
    color: #a0a0a0;
}

.edit-mode {
    border: 2px solid var(--primary-color);
    background-color: rgba(124, 95, 227, 0.05);
}

.edit-input {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    resize: none;
    outline: none;
    padding: 0;
    margin: 0;
}

.edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

.edit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color var(--transition-speed);
}

    .edit-btn:hover {
        background-color: #8768f8;
    }

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color var(--transition-speed);
}

    .cancel-btn:hover {
        background-color: #5a6268;
    }

[data-bs-theme="dark"] .model-selector label {
    color: var(--text-color);
}

[data-bs-theme="dark"] .chat-action-btn {
    background-color: var(--surface-color);
    color: var(--text-color);
}

[data-bs-theme="dark"] .empty-state {
    background-color: var(--background-color);
}

.chat-history,
.chat-messages {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .chat-history::-webkit-scrollbar,
    .chat-messages::-webkit-scrollbar {
        display: none;
    }

@media (max-width: 768px) {
    .app-container {
        height: 100vh;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform var(--transition-speed);
    }

    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar.closed {
        width:0px;
    }
        .mobile-menu-toggle {
            display: flex;
        }

    .message {
        max-width: 95%;
        gap: 0.75rem;
    }

    .message-content {
        max-width: calc(100% - 40px);
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .chat-title-text {
        display: none;
    }

    .quick-questions-list {
        gap: 0.5rem;
    }

    .quick-question-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }

    .chat-messages {
        padding: 1rem;
        gap: 1rem;
    }

    .theme-toggle-container {
        margin-right: 0.5rem;
    }

    .code-block {
        margin: 0.25rem 0;
    }

    .code-content {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .code-header {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .chat-header {
        margin-top: 80px;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .quick-questions-list {
        flex-direction: column;
    }

    .quick-question-btn {
        width: 100%;
        text-align: center;
    }

    .chat-input-wrapper {
        gap: 0.5rem;
    }

    .chat-input {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .message {
        max-width: 98%;
    }

    .message-content {
        max-width: calc(100% - 35px);
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }

    .message-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    .chat-messages {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .code-block {
        border-radius: 8px;
    }

    .code-content {
        padding: 0.4rem;
        font-size: 0.75rem;
    }

    .chat-header {
        margin-top: 60px;
        padding: 0.5rem;
    }
}

@media (max-width: 360px) {
    .message-content {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    .chat-input {
        font-size: 0.85rem;
    }

    .quick-question-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }

    .code-content {
        font-size: 0.7rem;
    }
}

.editor {
    border: 1px solid #ddd;
    padding: 15px;
    min-height: 150px;
    outline: none;
    line-height: 1.5;
    border:none;
}

/* Стили для параграфов внутри редактора */
.editor p {
    margin: 0;
    padding: 0;
    min-height: 1.5em; /* Важно, чтобы пустая строка была видна */
}
/* Прибиваем блок к низу страницы, если это нужно */
.chat-footer {
    position: sticky;
    bottom: 0;
    /*background: #fff;*/
    padding: 10px;
    width: 100%;
}

.chat-input-container {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    border-radius:35px;
}

.editor-wrapper {
    /*background: #f1f1f1;*/
    border-radius: 12px;
    padding: 8px 12px;
    border: none;
}

.editor {
    /* Основные правила для роста */
    min-height: 24px; /* Высота одной строки */
    max-height: 200px; /* Максимальная высота, после которой пойдет скролл */
    overflow-y: auto; /* Появление скролла */

    outline: none;
    word-break: break-word;
    line-height: 1.5;
    font-size: 16px;
}

    /* Стилизация скроллбара (опционально, для красоты) */
    .editor::-webkit-scrollbar {
        width: 4px;
    }

    .editor::-webkit-scrollbar-thumb {
        /*background-color: #ccc;*/
        border-radius: 10px;
    }

    /* Настройка параграфов внутри */
    .editor p {
        margin: 0;
        min-height: 1.5em;
    }

    /* Плейсхолдер для contenteditable */
    .editor:empty:before {
        content: attr(placeholder);
        color: #888;
        pointer-events: none;
    }

.custom-dropdown {
    position: relative;
    user-select: none;
}

.dropdown-trigger {
    background: #f8f9fa;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: space-between;
}

.dropdown-trigger:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dropdown-menu-custom {
    position: absolute;
    bottom: 110%; /* Открывается вверх, если чат внизу */
    right: 0;
    max-height:300px;
    overflow-y:auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    list-style: none;
    padding: 8px;
    margin: 0;
    width: 200px;
    z-index: 1000;
}

[data-bs-theme="dark"]
.dropdown-menu-custom {
    background: #19161e;
}
[data-bs-theme="dark"]
.dropdown-trigger {
    background: #17151b
}

.dropdown-menu-custom li {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

        .dropdown-menu-custom li:hover {
            background: #f0f2f5;
        }

        .dropdown-menu-custom li.active {
            background: #e7f3ff;
            color: #007bff;
        }

.rotate {
    transform: rotate(180deg);
}

/* Анимация появления */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.2s, transform 0.2s;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
    transform: translateY(10px);
}

.image-model .model-type-icon {
    color: #8e44ad; /* Фиолетовый для творчества */
}

.model-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    flex-grow: 1;
}

.model-desc {
    font-size: 0.75rem;
    color: #888;
}

/* Кнопка отправки в режиме картинки */
.btn-image-mode {
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%) !important;
    border: none !important;
    color: white !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    transition: transform 0.2s;
}

.btn-image-mode:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}


.text-purple {
    color: #a855f7;
}

.text-blue {
    color: #3b82f6;
}

.bg-purple {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.bg-blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

/* Индикатор режима */
.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Изменение рамки контейнера при арт-режиме */
.chat-input-container.mode-image {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}
[data-bs-theme="dark"]
.files-preview-container {
    background: #17151b
}
[data-bs-theme="dark"]
.file-chip {
    background-color:#212121;
    color:white;
}
/* Контейнер файлов */
.files-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: transparent;
    /*border-radius: 12px;*/
    border: none;
}

.file-chip {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
    gap: 6px;
}

.file-size {
    color: #888;
    font-size: 11px;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    padding: 0 2px;
}

.remove-file-btn:hover {
    color: #cc0000;
}
.upload-progress-wrapper {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #eee;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    transition: width 0.3s ease; /* Плавное движение шкалы */
}

/* Иконки PDF и кода в чипсах */
.text-danger {
    color: #e74c3c;
}

.text-primary {
    color: #3498db;
}

.message-image-wrapper {
    margin-top: 10px;
    max-width: 100%;
    /*display: flex;*/
    /*justify-content: flex-start;*/
}

.message-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    /* Ограничение по высоте */
    max-height: 400px;
}

/* Если хочешь разное выравнивание */
.message.user .message-image-wrapper {
    justify-content: flex-end;
}
.image-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.download-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #2b7cff;
    color: white;
    font-size: 13px;
    transition: background 0.2s ease;
}

    .download-btn:hover {
        background: #1f5fd1;
    }


.message-files {
margin-top: 10px;
display: flex;
flex-direction: column;
gap: 6px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f4f4;
    padding: 6px 10px;
    border-radius: 8px;
    color:#2b1c49
}

[data-bs-theme="dark"]
.file-item {
    background: #2b1c49;
    color: #f4f4f4;
}
.file-icon i {
    font-size: 16px;
    color: #555;
}

.file-name {
flex-grow: 1;
word-break: break-all;
}

.file-download i {
color: #2b7cff;
cursor: pointer;
}

.file-download i:hover {
    color: #1f5fd1;
}
/* Recording Pulse Animation */
.recording-pulse {
    animation: pulse-red 1.5s infinite;
    background-color: rgba(255, 0, 0, 0.1) !important;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

.message-audio-wrapper audio {
    max-height: 40px;
    border-radius: 20px;
}

.bg-success { background-color: #28a745 !important; }
.bg-warning { background-color: #ffc107 !important; color: #000 !important; }

