﻿/* =========================================================
   ОСНОВНОЙ LAYOUT
   ========================================================= */
.main-chat-page {
    padding: 16px 32px;
    box-sizing: border-box;
}

.chat-page {
    display: flex;
    flex-direction: row;
    gap: 18px;
    height: 100%;
    overflow: hidden;
    margin-top: 84px;
    box-sizing: border-box;
}

    .chat-page.no-info {
        margin-left: 352px;
    }

    .chat-page.with-info {
        margin-left: 322px;
        margin-right: 240px;
    }

/* =========================================================
   TOP BAR
   ========================================================= */
.chat-topbar {
    position: fixed;
    top: 0;
    left: 342px;
    right: 0;
    height: 84px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    z-index: 90;
}

.chat-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-topbar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-topbar-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-topbar-name {
    font-size: 16px;
    font-weight: 500;
    color: #453D44;
}

.chat-topbar-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(69,61,68,0.7);
}

.chat-topbar-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.04);
    color: #453D44;
}

    .chat-topbar-right.no-info {
        right: 70px;
    }

    .chat-topbar-right.with-info {
        right: 310px;
    }

/* =========================================================
   ЧАТ – КОНТЕЙНЕР И ПРОЗОРЕЦ
   ========================================================= */
.chat-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.chat-window {
    flex-grow: 1;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-bottom: 180px; /* для фиксированного input-bar */
}

    .chat-window::-webkit-scrollbar {
        width: 8px;
    }

    .chat-window::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.15);
        border-radius: 8px;
    }

/* =========================================================
   СИСТЕМНЫЕ ЭЛЕМЕНТЫ
   ========================================================= */
.system-message {
    align-self: center;
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(69,61,68,0.6);
}

.chat-date-separator {
    align-self: center;
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 14px;
    background-color: rgba(69,61,68,0.32);
    color: #FFFFFF;
}

.chat-system-card {
    align-self: center;
    max-width: 420px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background-color: #F4F3F1;
    color: #453D44;
    font-size: 15.5px;
    line-height: 1.55;
    margin: 8px 0;
}

    .chat-system-card.muted {
        opacity: 0.85;
    }

/* =========================================================
   СООБЩЕНИЯ
   ========================================================= */
.my-message,
.other-message {
    font-size: 14px;
    line-height: 1.4;
    max-width: 60%;
    padding: 10px 14px;
    border-radius: 14px;
}

.my-message {
    align-self: flex-end;
    background-color: #70646E;
    color: #FFFDFB;
    border-radius: 14px 14px 0 14px;
}

    .my-message .message-meta {
        color: rgba(255, 255, 255, 0.6);
        font-size: 12px;
        margin-top: 4px;
    }

.other-message-sender {
    display: flex;
    gap: 6px;
}

.other-message {
    background-color: #F4F3F1;
    color: #453D44;
    border-radius: 14px 14px 14px 0;
}

    .other-message .message-meta {
        color: rgba(69, 61, 68, 0.5);
        font-size: 12px;
        margin-top: 4px;
    }

.chat-avatar,
.chat-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =========================================================
   INPUT BAR
   ========================================================= */
.input-bar {
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #FFFFFF;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    z-index: 100;
}

    .input-bar.with-info,
    .input-bar.no-info {
        right: 296px;
    }

    .input-bar input {
        flex-grow: 1;
        border: none;
        outline: none;
        background: transparent;
        font-size: 15px;
        color: #453D44;
    }

.btn-emoji,
.btn-file {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #70646E;
}

.btn-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #70646E;
    color: #FFFDFB;
    border: none;
    cursor: pointer;
}

/* =========================================================
   ДЕСЕН ИНФО-САЙДБАР
   ========================================================= */
.chat-info-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    padding: 20px 18px;
    background-color: #FFFFFF;
    box-shadow: -4px 0 12px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 95;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

    .chat-info-sidebar.hidden {
        transform: translateX(100%);
        opacity: 0;
        pointer-events: none;
    }

.open-sidebar-btn,
.close-sidebar-btn {
    border: none;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    color: #70646E;
    background: none;
    position: fixed;
    z-index: 100;
}

.close-sidebar-btn {
    position: absolute;
    width: 28px;
    height: 28px;
    top: 10px;
    right: 10px;
    font-size: 20px;
}

.open-sidebar-btn {
    top: 24px;
    right: 16px;
    width: 36px;
    height: 36px;
}

.chat-info-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.chat-info-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-info-profile h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}

.chat-info-profile span {
    font-size: 0.85rem;
    color: #777;
}

.chat-info-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-info-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

    .chat-info-action i {
        font-size: 1.1rem;
        color: #666;
    }

    .chat-info-action span {
        font-size: 0.95rem;
        color: #333;
    }

    .chat-info-action:hover {
        background: #ECEBE8;
    }

.chat-info-section {
    margin-top: auto;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* =========================================================
   SWAP NOTIFICATION
   ========================================================= */
.swap-notification {
    position: relative;
    margin: 10px auto;
    padding: 10px 16px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #856404;
    max-width: 480px;
}

    .swap-notification button {
        font-size: 0.85rem;
        padding: 4px 10px;
    }

/* =========================================================
   ОЦЕНКИ
   ========================================================= */
.stars-container,
.stars,
.rate-stars {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.star,
.rate-star {
    cursor: pointer;
    color: #ccc;
    transition: color 0.15s ease, transform 0.1s ease;
}

    .star:hover,
    .star.selected,
    .rate-star.selected {
        color: #f5b301;
    }

    .rate-star:hover {
        transform: scale(1.1);
    }

.rate-help-inline {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #f9f9f9;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

    .rate-help-inline h5 {
        margin-bottom: 8px;
        font-size: 1rem;
        color: #333;
    }

.rate-textarea {
    width: 100%;
    min-height: 56px;
    resize: none;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    padding: 8px 10px;
    font-size: 14.5px;
    background-color: #FFFDFB;
    color: #453D44;
    margin-bottom: 10px;
}

    .rate-textarea:focus {
        outline: none;
        border-color: #70646E;
    }

.rate-send-btn {
    width: 100%;
    height: 36px;
    border-radius: 12px;
    border: none;
    background-color: #70646E;
    color: #FFFDFB;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

    .rate-send-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

/* =========================================================
   AI СООБЩЕНИЯ
   ========================================================= */
.ai-message {
    line-height: 1.6;
    font-size: 15px;
    max-width: 70%;
}

    .ai-message h2 {
        font-size: 1.3em;
        margin-top: 1em;
    }

    .ai-message h3 {
        font-size: 1.15em;
        margin-top: 0.8em;
    }

    .ai-message strong {
        font-weight: 600;
    }

    .ai-message em {
        font-style: italic;
    }

    .ai-message blockquote {
        border-left: 4px solid #ccc;
        padding-left: 12px;
        color: #666;
        margin: 10px 0;
    }

        .ai-message blockquote strong {
            color: #453D44;
        }

    .ai-message p,
    .ai-message ul,
    .ai-message ol {
        margin: 6px 0;
    }

    .ai-message ul,
    .ai-message ol {
        padding-left: 20px;
    }

    .ai-message code,
    .ai-message pre {
        font-family: monospace;
    }

    .ai-message code {
        background: #f4f4f4;
        padding: 2px 6px;
        border-radius: 4px;
    }

    .ai-message pre {
        background: #f6f5f4;
        padding: 10px 12px;
        border-radius: 8px;
        overflow-x: auto;
        font-size: 13px;
        margin: 8px 0;
    }

    .ai-message table {
        border-collapse: collapse;
        margin: 10px 0;
        font-size: 14px;
    }

    .ai-message th,
    .ai-message td {
        border: 1px solid rgba(0,0,0,0.1);
        padding: 6px 10px;
        text-align: left;
    }

    .ai-message th {
        background: #f0efed;
        font-weight: 600;
    }

/* =========================================================
   INLINE EDIT MESSAGE (Messenger-style)
   ========================================================= */
.my-message.editing {
    background-color: #5f545d;
    padding: 8px 10px;
    border-radius: 14px 14px 0 14px;
}

.edit-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-input {
    flex-grow: 1;
    background-color: rgba(255,255,255,0.15);
    border: none;
    outline: none;
    color: #FFFDFB;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
}

    .edit-input::placeholder {
        color: rgba(255,255,255,0.6);
    }

.edit-actions {
    display: flex;
    gap: 6px;
}

.edit-btn.save {
    background-color: rgba(40,167,69,0.85);
    color: #fff;
}

    .edit-btn.save:hover {
        background-color: rgba(40,167,69,1);
    }

.edit-btn.cancel {
    background-color: rgba(220,53,69,0.85);
    color: #fff;
}

    .edit-btn.cancel:hover {
        background-color: rgba(220,53,69,1);
    }

.edit-preview {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #2f2a2e;
    border-left: 4px solid #7c6b76;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #ddd;
    z-index: 105;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    min-width: 200px;
}

.edit-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 4px;
}

.edit-preview-content {
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-preview .edit-cancel-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
}

/* =========================================================
   РЕЖИМ ОТВЕТА НА СООБЩЕНИЕ
   ========================================================= */
.reply-preview {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 16px;
    right: 16px;
    background-color: #F4F3F1;
    border-left: 4px solid #70646E;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #453D44;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 105;
    max-width: calc(100% - 32px);
}

.reply-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 4px;
    color: #222;
}

    .reply-preview-header button {
        background: none;
        border: none;
        font-size: 16px;
        cursor: pointer;
        color: #70646E;
        transition: color 0.15s ease;
    }

        .reply-preview-header button:hover {
            color: #453D44;
        }

.reply-preview-content {
    font-size: 13px;
    color: rgba(69,61,68,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   АДАПТИВНОСТЬ И ПЛАВНОЕ ПОЯВЛЕНИЕ
   ========================================================= */
.context-menu,
.reply-preview {
    opacity: 0;
    transform: translateY(-6px);
    animation: fadeInUp 0.15s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   CHAT BOTTOM FIXED
   ========================================================= */
.chat-bottom-fixed,
.chat-bottom-fixed.input-bar-wrapper {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 110;
    width: calc(100% - 40px);
    max-width: 600px;
}
/* =========================================================
   CHAT BOTTOM FIXED — исправленный
   ========================================================= */
.chat-bottom-fixed {
    position: fixed;
    bottom: 16px;
    left: 352px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center; /* 3. Центрира съдържанието хоризонтално */
    gap: 8px;
    z-index: 110;
    pointer-events: none; /* 4. Позволява кликове през празните места */
    /* Нулираме старите ограничения */
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
}

    /* Ако използвате клас .with-info за отворен десен сайдбар */
    .chat-bottom-fixed.with-info {
        right: 280px; /* Отмества центъра, за да не се закрива от десния панел */
    }

    /* Връщаме клика върху самите елементи (input-bar, reply-preview) */
    .chat-bottom-fixed > * {
        pointer-events: auto;
    }

    /* Настройки заInput Bar и другите плаващи елементи вътре */
    .chat-bottom-fixed .input-bar,
    .chat-bottom-fixed .input-bar.no-info,
    .chat-bottom-fixed .input-bar.with-info,
    .chat-bottom-fixed .chat-system-card,
    .chat-bottom-fixed .rate-card,
    .chat-bottom-fixed .reply-preview {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        /* Ширина и центриране */
        width: calc(100% - 40px);
        max-width: 900px; /* Тук определяте колко широк да е бара (напр. 900px) */
        flex-shrink: 0;
    }

/* =========================================================
   RESPONSIVE (Таблети 641px – 1024px)
   collapsed sidebar = 60px, swaps sidebar = 220px → общо 280px
   ========================================================= */
@media (min-width: 641px) and (max-width: 1024px) {

    .chat-page.no-info {
        margin-left: 292px; /* 60px collapsed + 220px swaps + 12px gap */
        margin-top: 84px;
    }

    .chat-page.with-info {
        margin-left: 292px;
        margin-right: 200px;
        margin-top: 84px;
    }

    .chat-topbar {
        left: 282px;
    }

    .chat-bottom-fixed,
    .chat-bottom-fixed.input-bar-wrapper {
        left: 282px !important;
    }

    .chat-bottom-fixed.with-info {
        right: 200px !important;
    }

    /* Съобщенията да не излизат извън екрана */
    .my-message {
        max-width: 75%;
    }

    .ai-message {
        max-width: 85%;
    }
}

/* =========================================================
   RESPONSIVE (Таблети 641px – 1024px) — AI chat (без swaps sidebar)
   full sidebar = 200px
   ========================================================= */
@media (min-width: 641px) and (max-width: 1024px) {
    .ai-chat-page .chat-page {
        margin-left: 212px;
    }

    .ai-chat-page .chat-bottom-fixed,
    .ai-chat-page .chat-bottom-fixed.input-bar-wrapper {
        left: 212px !important;
    }
}

/* =========================================================
   RESPONSIVE (Таблети 768px – 1024px) — вече е покрит от горния блок
   ========================================================= */
@media (max-width: 768px) {
    /* Само за зоната 641-768px (под 640 се поема от мобилния блок) */
    .chat-topbar-left {
        gap: 8px;
    }

    .chat-topbar-avatar {
        width: 40px;
        height: 40px;
    }
}

/* =========================================================
   CHAT BOTTOM FIXED & INPUT BAR WRAPPER — FINAL GLOBAL FIX
   ========================================================= */

.chat-bottom-fixed,
.chat-bottom-fixed.input-bar-wrapper {
    position: fixed;
    bottom: 16px;
    left: 352px; /* Започва след навигацията */
    right: 0; /* Стига до края на екрана */

    display: flex;
    flex-direction: column;
    align-items: center; /* Центрира съдържанието хоризонтално */
    gap: 8px;
    z-index: 110;
    pointer-events: none; /* Позволява кликове през празните места */
    /* Нулираме старите ограничения */
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
}

    /* Ако използвате клас .with-info (отворен десен панел) */
    .chat-bottom-fixed.with-info,
    .chat-bottom-fixed.input-bar-wrapper.with-info {
        right: 280px; /* Отмества се, за да не се закрива от десния панел */
    }

    /* Връщаме клика върху самите елементи */
    .chat-bottom-fixed > *,
    .chat-bottom-fixed.input-bar-wrapper > * {
        pointer-events: auto;
    }

    /* СТИЛОВЕ ЗА САМИЯ INPUT BAR И КАРТИТЕ */
    .chat-bottom-fixed .input-bar,
    .chat-bottom-fixed .chat-system-card,
    .chat-bottom-fixed .rate-card,
    .chat-bottom-fixed .reply-preview,
    .chat-bottom-fixed .replying-indicator,
    .chat-bottom-fixed .edit-preview {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        width: calc(100% - 40px);
        max-width: 900px;
        flex-shrink: 0;
    }

/* =========================================================
   AI CHAT PAGE — няма topbar, margin-top по-малък
   ========================================================= */
.ai-chat-page .chat-page {
    margin-top: 0;
}

/* =========================================================
   RESPONSIVE (Таблети < 768px)
   ========================================================= */
@media (max-width: 768px) {
    .chat-bottom-fixed,
    .chat-bottom-fixed.input-bar-wrapper,
    .chat-bottom-fixed.with-info {
        left: 70px !important;
        right: 0 !important;
        width: auto !important;
    }

        .chat-bottom-fixed .input-bar,
        .chat-bottom-fixed .chat-system-card {
            width: calc(100% - 24px);
        }
}

/* =========================================================
   RESPONSIVE (Мобилни ≤ 640px) — bottom nav bar е 60px
   ========================================================= */
@media (max-width: 640px) {

    /* ---- main layout chain: нужна е явна височина за flex-grow ---- */
    .app-layout,
    .main-content {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .main-chat-page {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 0 !important;
        min-height: 0;
    }

    /* Chat page: заема цялото останало пространство */
    .chat-page,
    .chat-page.no-info,
    .chat-page.with-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 56px !important;     /* под topbar-а на Chat.razor */
        overflow: hidden;
    }

    /* AI chat — няма topbar, не трябва отместване */
    .ai-chat-page .chat-page {
        margin-top: 0 !important;
    }

    /* Chat container заема цялото пространство */
    .chat-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    /* Chat window скролва само вътре в себе си */
    .chat-window {
        flex: 1;
        overflow-y: auto;
        padding: 12px 10px !important;
        padding-bottom: 140px !important; /* input bar(~60) + bottom bar(60) + отстояние */
    }

    /* Topbar: цяла ширина, без отместване от сайдбар */
    .chat-topbar {
        left: 0 !important;
        right: 0 !important;
        height: 56px !important;
        padding: 0 14px !important;
    }

    /* Input bar: вдигнат над bottom nav bar-а (60px) + 8px отстояние */
    .chat-bottom-fixed,
    .chat-bottom-fixed.input-bar-wrapper,
    .chat-bottom-fixed.with-info {
        left: 0 !important;
        right: 0 !important;
        bottom: 68px !important;
        width: 100% !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
    }

        .chat-bottom-fixed .input-bar,
        .chat-bottom-fixed .chat-system-card {
            width: 100% !important;
            max-width: none !important;
        }
}



.ai-warning {
    font-size: 14px;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    opacity: 0.95;
}

    .ai-warning.toxic {
        background: #f8d7da;
        border-left-color: rgba(220, 53, 69, 0.65);
    }

    .ai-warning.fact {
/*      background-color: #E3EFE1;
        border-left-color: #415247;
        color: #415247;*/

        background-color: #EDE7F0;
        border-left-color: #4E4650;
        color: #4E4650;

/*        background-color: #E7F1F7;
        border-left-color: #3F4E5A;
        color: #3F4E5A;*/
    }

.highlight {
    border: 2px solid #70646E;
    background: #908693;
    display: inline-block;
}

.message-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 100%;
}

.my-message {
    display: inline-block;
    max-width: 60%;
    min-width: 40px;
    width: fit-content;
}


.ai-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 60%;
    margin-bottom: 2px;
}



/* =========================================================
   TOXIC INFORM COUNT
   ========================================================= */
.toxic-inform-count {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.18);
    color: #453D44;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

    .toxic-inform-count p {
        margin: 0;
    }

    .toxic-inform-count .sub {
        margin-top: 4px;
        font-size: 12px;
        color: rgba(69, 61, 68, 0.65);
    }

    .toxic-inform-count strong,
    .toxic-inform-count span {
        color: #dc3545;
        font-weight: 600;
    }







.ai-answer-btn {
    transition: 0.2s;
}

    .ai-answer-btn.selected {
        border: 2px solid #007bff;
    }

    .ai-answer-btn.correct {
        background-color: #28a745;
        color: white;
    }

    .ai-answer-btn.wrong {
        background-color: #dc3545;
        color: white;
    }







/* =========================================================
   SIDEBAR – ОЦЕНКИ И AI
   ========================================================= */

.chat-info-evaluation {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-block {
    background: #F4F3F1;
    border-radius: 12px;
    padding: 12px;
}

.info-title {
    font-size: 13px;
    font-weight: 600;
    color: #453D44;
    margin-bottom: 6px;
}

.review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

    .review-stars span {
        font-size: 16px;
        color: #ccc;
    }

        .review-stars span.filled {
            color: #f5b301;
        }

.review-comment {
    font-size: 13px;
    color: #555;
    font-style: italic;
}

.ai-metric {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #453D44;
    padding: 2px 0;
}

/* =========================================================
   AI QUESTIONS (question-text, answers)
   ========================================================= */

.question-text {
    font-size: 15.5px;
    font-weight: 500;
    color: #453D44;
    margin-bottom: 12px;
    line-height: 1.5;
    text-align: center;
}

/* Контейнер ответов */
.answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Кнопки ответов */
.ai-answer-btn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background-color: #FFFFFF;
    color: #453D44;
    font-size: 14px;
    transition: all 0.15s ease;
    cursor: pointer;
}

    /* hover */
    .ai-answer-btn:hover {
        background-color: #F4F3F1;
    }

    /* выбранный */
    .ai-answer-btn.selected {
        border: 1.5px solid #70646E;
        background-color: #EFEDEE;
    }

    /* правильный */
    .ai-answer-btn.correct {
        background-color: rgba(40,167,69,0.12);
        border: 1.5px solid rgba(40,167,69,0.5);
        color: #2e7d32;
    }

    /* неправильный */
    .ai-answer-btn.wrong {
        background-color: rgba(220,53,69,0.12);
        border: 1.5px solid rgba(220,53,69,0.5);
        color: #a94442;
    }

    /* дизейбл после ответа */
    .ai-answer-btn:disabled {
        cursor: default;
        opacity: 0.9;
    }


/* =========================================================
   SUMMARY (результаты после свапа)
   ========================================================= */

.summary {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background-color: #F4F3F1;
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 14.5px;
    color: #453D44;
    line-height: 1.5;
}

    /* заголовки внутри summary */
    .summary p strong {
        font-weight: 600;
        color: #2f2a2e;
    }

    /* отступы между строками */
    .summary p {
        margin: 4px 0;
    }

    /* звёзды внутри summary (если используются) */
    .summary .review-stars {
        margin-top: 4px;
    }

    /* комментарий */
    .summary .review-comment {
        margin-top: 6px;
        font-size: 13px;
        color: #666;
        font-style: italic;
    }