.chat-bubble {
    max-width: 92%;
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.55;
}

.user-bubble {
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.assistant-bubble {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

/* МГП карточка */
.mgp-card {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    margin-bottom: 18px;
    transition: 0.3s;
}
.mgp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* кнопки выбора */
.option-btn {
    padding: 12px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-align: left;
    transition: 0.2s;
}
.option-btn:hover {
    background: #eff6ff;
}

/* скролл списков */
.scroll-box {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
}

.option-btn.selected {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.footer-btn:hover {
    background: #e2e8f0;
}

/* Подсветка кнопки сравнения, если товар уже в списке */
.cmp-btn.active {
    background: #7c3aed;
    color: white;
}

/* Модальное окно сравнения */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.compare-modal {
    background: white;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 20px;
    overflow-x: auto;
    padding: 24px;
    position: relative;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.compare-table th, .compare-table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 14px;
}

.compare-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
}

/* Контейнер для кнопки и иконки */
.option-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Кнопка теперь занимает всё пространство, кроме места под иконку */
.option-btn-custom {
    flex-grow: 1;
    padding: 12px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-align: left;
    transition: 0.2s;
    font-size: 14px;
}

.option-btn-custom.selected {
    background: #2563eb;
    color: white;
}

/* Иконка "i" */
.info-trigger {
    margin-left: -40px; /* Накладываем поверх края кнопки */
    margin-right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: 0.2s;
}

.info-trigger:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

/* Стили для всплывающего окна (модалки) */
.info-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 3000;
    width: 90%;
    max-width: 450px;
    display: none;
}

.info-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2999;
    display: none;
}

.assistant-bubble {
    max-width: 90%;
    margin-right: auto;
}
.user-bubble {
    max-width: 90%;
    margin-left: auto;
    background-color: #eff6ff;
}

#knowledgeChatMessages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 1rem;
    height: 100%;
}

#knowledgeChatMessages::-webkit-scrollbar {
    width: 6px;
}
#knowledgeChatMessages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}