/* Панель ИИ-ассистента: карточки сообщений, блоки кода, поле ввода. */

.ai-chat-panel {
    background: #22262d;
    border-left: 1px solid #363c46;
}

/* Вертикальные отступы задаются line-height, а не padding: Webix считает высоту
   строки лейаута без CSS-padding, и шаблон с padding отрисовывается выше своего
   места, выдавливая нижние кнопки панели за границу окна. */
.ai-chat-header {
    padding: 0 12px;
    line-height: 33px;
    font-size: 12px;
    color: #94a1b3;
    border-bottom: 1px solid #363c46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chat-list .webix_list_item {
    background: transparent;
    border: none;
    padding: 0;
}

.ai-chat-list .webix_list_item.webix_selected {
    background: transparent;
}

.ai-chat-row {
    display: flex;
    padding: 5px 10px;
}

.ai-chat-row-user {
    justify-content: flex-end;
}

.ai-chat-row-assistant {
    justify-content: flex-start;
}

.ai-chat-card {
    max-width: 94%;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ai-chat-row-assistant .ai-chat-card {
    background: #2b313a;
    border: 1px solid #3b434e;
    color: #e7ebf0;
    border-top-left-radius: 3px;
}

.ai-chat-row-user .ai-chat-card {
    background: #1d5566;
    border: 1px solid #2a6c80;
    color: #eaf6f9;
    border-top-right-radius: 3px;
}

.ai-chat-role {
    margin-bottom: 4px;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
}

.ai-chat-code {
    margin: 7px 0 3px;
    padding: 9px;
    background: #161a20;
    border: 1px solid #333b46;
    border-radius: 6px;
    color: #d7e2ee;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre;
    overflow-x: auto;
}

.ai-chat-thinking {
    opacity: 0.65;
    font-style: italic;
}

.ai-chat-input textarea {
    font-size: 13px;
    line-height: 1.4;
    resize: none;
}

.ai-chat-actions .webix_el_button,
.ai-chat-apply .webix_el_button {
    font-size: 12px;
}

.ai-chat-hint {
    padding: 0 12px;
    line-height: 26px;
    font-size: 11px;
    color: #7d8798;
}

.ai-preview-modes {
    padding: 8px 10px 2px;
}

.ai-preview-blocks {
    padding: 2px 10px 8px;
}
