* {
            box-sizing: border-box;
        }

.side-panel-label {
    border-top-right-radius: 0;
    border-bottom-right-radius: 18px;
}
.side-panel-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3001;
    display: block;
    width: calc(100% - 5px) !important;
    background: #eef2f4;
    transform-origin: 100% 50%;
    border-radius: 16px 0 0 16px;
}

.side-panel-labels {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: calc(100% - 20px) !important;
    top: 10px;
    z-index: 2;
    transform: translateX(-100%);
    transition: all .3s ease;
    pointer-events: none;
}
.side-panel.--self-contained .side-panel-content-container {
    overflow: visible !important;
}
.robosmart-sidepanel-container .side-panel,
.robosmart-sidepanel-container .side-panel-content,
.robosmart-sidepanel-container .side-panel-content-container {
    height: 100%;
}

.robosmart-sidepanel-container .side-panel-content {
    overflow: hidden;
}

.robosmart-panel-wrapper,
.robosmart-panel-page,
.page,
.layout {
    height: 100%;
    min-height: 0;
}
.side-panel-content-container, .side-panel-content-wrapper {
    border-radius: 16px 0 0 16px;
}
        .page {
            max-width: 100%;
            height: 100%;
            margin: 0 auto;
            font-family: 'Montserrat', sans-serif;
        }

        .layout {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            height: 100%;
        }
        .robosmart-panel-page {
            height: 100%;
        }

        /* ===== Боковое меню ===== */
        .chat-menu-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .chat-side-menu {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            min-width: 280px;
            max-width: 400px;
            height: 100%;
            background: #fff;
            z-index: 25;
            overflow-y: auto;
            padding: 16px;
            box-shadow: 2px 0 8px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
        }
        .side-menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px 10px 3px;
            font-weight: 500;
            margin-bottom: 10px;
        }
        .new-chat-btn {
            background: #fdd816;
            border: none;
            border-radius: 6px;
            padding: 12px 18px;
            cursor: pointer;
            font-weight: 500;
        }
        .chat-list-container {
            flex: 1;
            overflow-y: auto;
        }
        .chat-list-item {
            padding: 10px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 6px;
            margin-bottom: 2px;
        }
        .chat-list-item:hover {
            background: #fafafa;
        }
        .chat-list-item.active {
            background: #f3f4f6;
            font-weight: 500;
        }
        .chat-list-item .chat-title-text {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-right: 8px;
        }
        .chat-list-item .chat-actions {
            display: none;
            gap: 6px;
        }
        .chat-list-item:hover .chat-actions {
            display: flex;
        }
        .chat-actions button {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
            padding: 2px 5px;
            border-radius: 4px;
        }
        .close-menu-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            padding: 0 4px;
            color: #666;
        }
        .close-menu-btn:hover {
            color: #000;
        }

        /* Cтили для приветствия */
        #welcome-message {
            height: 100%;
        }
        #welcome-message .message-row {
            height: 100%;
            display: flex;
            gap: 12px;
            align-items: center;
        }
        #welcome-message .bubble-wrap {
            width: 100%;
        }
        #welcome-message .bubble {

        }
        #welcome-message .message-row.assistant .bubble p {
            font-size: 1.25rem !important;
            letter-spacing: -0.025rem !important;
        }
        #welcome-message .chip {
            border: 0;
            background: #f7f7f7;
            border-radius: 6px;
            padding: 0.5rem 1rem;
            font: inherit;
            font-size: 1rem;
            cursor: pointer;
        }
        #welcome-message .welcome-message-meta {
        font-size: 4rem;
            letter-spacing: -0.25rem;
            font-weight: 500;
            opacity: 0.7;
            transition: opacity 0.2s;
            background-image: linear-gradient(90deg, #ff0080, #ff8c00, #ff0080);
            background-size: 200% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: shine 3s linear infinite;
            line-height: normal;
            margin-bottom: 30px;
        }
        #welcome-message .disclaimer_grey {
            color: #979797 !important;
            font-size: 0.75rem;
            padding: 1rem 0;
            line-height: 1.2rem;
        }

        .assistant-chat-button {
            position: fixed;
            bottom: 60px;
            right: 75px;
            z-index: 1000;
            border: none;
            width: 56px;
            height: 56px;
            cursor: pointer;
            /* box-shadow: 0 2px 10px rgba(0,0,0,0.2); */
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            background: none;
        }

        .chat {
            font-family: inherit;
            display: flex;
            border: 0px solid #e5e7eb;
            background: #fff;
            overflow: hidden;
            height: 100%;
            min-height: 0;
            flex-direction: column;
            border-radius: 16px 0 0 16px;
        }

        .chat-header {
            flex: 0 0 auto;
            padding: 10px 3rem;
            height: 55px;
        }

        .chat-header-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: fit-content;
        }

        .chat-title {
            font-size: 18px;
            font-weight: 500;
            margin: 0 0 4px;
            letter-spacing: -0.05rem;
            align-self: center;
        }

        .chat-btn-composser {
            display: block;
            width: auto;
            position: absolute;
            left: calc(100% - 110px) !important;
        }

        .chat-clear-btn {
            cursor: pointer;
            white-space: nowrap;
            margin-right: 70px;
            background: #f3f4f6;
            padding: 5px;
            border-radius: 6px;
        }

        .chat-clear-btn:hover {
            border-color: #111;
            opacity: 0.7;
        }

        .chat-subtitle {
            margin: 0;
            font-size: 0.8rem;
            color: #959595;
            line-height: 1.45;
            width: max-content;
        }

        .chat-messages {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            flex: 1 1 auto;
            min-height: 0;
            max-height: none;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .message-row {
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        .message-row.user {
            justify-content: flex-end;
        }

        .bubble-wrap {
            max-width: 100%;
            width: fit-content;
            position: relative;
        }

        .message-row.user .bubble-wrap {
            max-width: 80%;
        }

        .bubble {
            border-radius: 16px 0 16px 16px;
            padding: 1.5rem;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
            background: #f9f9f9;
            line-height: 1.5rem;;
        }

        .message-row.user .bubble {
            background: #f3f4f6;
        }

        .bubble-error {
            background: #fff5f5;
            border: 1px solid #fecaca;
        }

        .composer {
            width: calc(100% - 26px);
            padding: 16px 16px 3px 16px;
            background: #f3f4f6;
            margin: 0 10px 10px 10px;
            border-radius: 16px;
            z-index: 11;
        }

        .composer-form {
            display: flex;
            flex: 0 0 auto;
            flex-wrap: nowrap;
            gap: 10px;
        }

        .composer-textarea {
            flex: 1;
            display: block;
            box-sizing: border-box;
            min-height: 52px;
            max-height: 52px;
            width: 80%;
            resize: vertical;
            border-radius: 12px;
            padding: 0 1rem 0 1rem;
            align-content: space-evenly;
            font: inherit;
            background: #fff;
            color: inherit;
            outline: none;
            font-size: 16px;
            scrollbar-width: none;
            line-height: normal;
        }

        .composer-textarea:focus {
            font-size: 16px;
        }

        .composer-textarea:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        .composer-btn {
            background: #fdd816;
            color: #242424;
            border-radius: 12px;
            font: inherit;
            font-weight: 500;
            cursor: pointer;
            white-space: nowrap;
            width: 52px;
            height: 52px;
            font-size: 2rem;
        }

        .composer-btn:hover {
            border-color: #111;
        }

        .composer-btn:disabled {
            opacity: 0.8;
            cursor: not-allowed;
        }
        .composer-subtitle {
            display: block;
            margin: 3px 0 0 0;
            font-size: 10px;
            color: #959595;
            line-height: normal;
            
        }


        /* Контейнер загрузки */
        .loading-bubble {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 1rem 0 1rem 0;
            min-width: 300px;
        }

        /* Контейнер для сменяющегося текста */
        .loading-text-container {
            position: relative;
            flex: 1;
            overflow: hidden;
            height: 20px; /* фиксированная высота, чтобы не дёргалось */
        }

        /* Каждая фраза */
        .loading-text {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            white-space: nowrap;
            color: #ff0080;
            font-size: 0.9em;
            line-height: 20px;
            opacity: 0;
            transform: translateY(-10px);
            transition: opacity 0.35s ease, transform 0.35s ease;
            text-shadow: 0 3px 6px rgba(0,0,0,0.15);
            background: linear-gradient(90deg, #ff0080, #ff8c00, #ff0080);
            background-size: 200% auto;
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: shimmer 2s linear infinite;
        }

        @keyframes shimmer {
            0% { background-position: 0% 50%; }
            100% { background-position: 200% 50%; }
        }

        /* Появление */
        .loading-text.show {
            opacity: 0.5;
            transform: translateY(0);
        }

        /* Индикатор загрузки в чате */
        .message-row.assistant .spinner {
        width: 24px;
        height: 24px;
        border: 3px solid #ffd7a5;
        border-top: 3px solid #ff0080;
        border-radius: 50%;
        animation: robospin 0.8s linear infinite;
        margin: 0 auto;
        }
        @keyframes robospin {
        to { transform: rotate(360deg); }
        }

        .chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 14px;
        }

        .chip {
            border: 0;
            background: #f7f7f7;
            border-radius: 6px;
            padding: 0.5rem 1rem;
            font: inherit;
            font-size: 0.85rem;
            cursor: pointer;
        }

        .chip:hover {
            opacity:0.7;
        }

        /* Базовые стили для текста в пузыре */
        .bubble p {
            margin: 0 0 10px;
        }

        .bubble-content div {
            margin: 0 0 10px;
        }
        .bubble p:last-child {
            margin-bottom: 0;
        }
        .bubble ul, .bubble ol {
            margin: 8px 0 12px 20px;
            padding: 0;
        }
        .bubble li {
            margin: 0;
            line-height: normal;
        }
        .bubble a {
            color: #2563eb;
            text-decoration: underline;
        }
        .bubble strong, .bubble b { font-weight: 700; }
        .bubble em, .bubble i { font-style: italic; }
        .bubble blockquote {
            margin: 10px 0;
            padding: 8px 12px;
            border-left: 3px solid #d1d5db;
            background: #f8fafc;
        }
        .bubble hr {
            border: 0;
            border-top: 1px solid #e5e7eb;
            margin: 12px 0;
        }
        .bubble pre {
            margin: 10px 0;
            padding: 10px 12px;
            border-radius: 10px;
            background: #111827;
            color: #f9fafb;
            overflow-x: auto;
        }
        .bubble code {
            font-family: monospace;
            font-size: 13px;
        }
        .copy-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            background: transparent;
            cursor: pointer;
            color: #9ca3af;
            transition: opacity 0.15s, color 0.15s, transform 0.1s;
        }
        .copy-btn:hover {
            opacity: 1;
            color: #374151;
        }
        .copy-btn:active {
            transform: scale(0.88);
            opacity: 0.6;
        }

        /* Стили для карточек  */

        /* Универсальные карточки — единый стиль для любых сущностей */
.card-body {
    padding: 16px;
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.card-brand {
    font-weight: 400;
    color: #6b7280;
    font-size: 14px;
}
.card-type {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 8px;
}
.card-price {
    margin: 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}
.card-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.4;
    margin: 8px 0;
}
.card-features {
    margin: 0 0 8px 18px;
    padding: 0;
    font-size: 13px;
}
.card-features li {
    line-height: normal;
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 6px;
    border-radius: 6px;
    background: #f1f1f1;
}
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}
.card-button {
    background: #111;
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
.card-button:hover {
    background: #333;
}
.card-seller {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}
.seller-logo {
    height: 20px;
    width: auto;
    max-width: 60px;
}
.card-note {
    margin-top: 1rem;
}
.card-cta {
    margin-top: 12px;
    text-align: center;
}

/* Скролл-карточки начало */

/* Адаптивный контейнер с видео 16:9 */
.bubble-card-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  gap: 10px;

  overflow-x: auto;
  overflow-y: hidden;

  padding: 0 10px 8px;
  margin: 0 calc(10px * -1);

  scroll-snap-type: x mandatory;
  scroll-padding-inline: 10px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bubble-card-slider::-webkit-scrollbar {
  display: none;
}

.bubble-card-slider__item {
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.responsive-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000;
    border-radius: 6px;
}

.responsive-video iframe,
.responsive-video video,
.responsive-video embed,
.responsive-video object {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.bubble-card-slider__item.sectionitems__elem {
    width: 100%;
    margin-bottom: 2.5rem;
    border-radius: 18px;
    -webkit-box-shadow: none;
    box-shadow: none;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

@media screen and (max-width: 320px) {
    .bubble-card-slider {
    grid-auto-columns: 85%;
    max-width: 330px;
    }
}


@media (min-width: 321px) and (max-width: 414px) {
  .bubble-card-slider {
    grid-auto-columns: 85%;
  }
}

@media (min-width: 415px) and (max-width: 1024px) {
  .bubble-card-slider {
    grid-auto-columns: calc(48% - 1rem);
  }
}

@media (min-width: 1025px) {
  .bubble-card-slider {
    grid-auto-columns: calc(25% - 2rem);
    padding: 0;
    margin: 0;
    scroll-snap-type: none;
  }
}
.bubble-card-slider {
    cursor: grab;
    user-select: none;
}

.bubble-card-slider.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.bubble-card-slider.is-dragging * {
    user-select: none;
    pointer-events: none;
}
/* Скролл-карточки конец */

/* ===== Единая стилизация ответов ассистента ===== */

/* Пузырь сообщения ассистента */
.message-row.assistant .bubble {
    width: 100%;
    background: none;
    transition: box-shadow 0.2s ease;
}

/* Текст внутри пузыря */
.message-row.assistant .bubble p {
    font-size: 1rem;
    line-height: normal;
}

.message-row.assistant .bubble p:last-child {
    margin-bottom: 0;
}

.message-row.assistant .bubble a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px dashed #93c5fd;
}

.message-row.assistant .bubble a:hover {
    border-bottom: 1px solid #3b82f6;
}

/* Списки */
.message-row.assistant .bubble ul,
.message-row.assistant .bubble ol {
    margin: 0.5rem 0 0.75rem;
}

.message-row.assistant .bubble li {
    line-height: inherit;
    margin: 0 0 10px 0;
}

/* Цитаты и код */
.message-row.assistant .bubble blockquote {
    background: #f1f5f9;
    border-left: 3px solid #94a3b8;
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
}

.message-row.assistant .bubble pre {
    background: #1e293b;
    border-radius: 12px;
    padding: 0.75rem;
    overflow: auto;
    overflow-y: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    width: 100%;
    max-width: 820px;
    padding-bottom: 50px;
}
.bubble-content pre {
    position: relative;
    padding-bottom: 50px;
}

.bubble-content pre .pre-copy-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    top: auto;
    z-index: 2;
    background: none;
    color: #fff;
}

.message-row.assistant .bubble code {
    font-size: 0.85rem;
}

/* Улучшенные карточки (единые для всех) */
.card {
    transition: all 0.2s ease;
    overflow: hidden;
}

.card-image {
    border-radius: 20px;
    width: auto;
    height: auto;
    max-height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 1rem;
    background: #fbfbfb;
    border-radius: 6px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-brand,
.card-type {
    font-size: 0.75rem;
    color: #64748b;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.card-desc {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}
.card-specs,
.card-extra {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 12px;
    font-size: 0.9rem;
    margin: 0 0 12px;
}
.card-features-title,
.card-specs-title,
.card-extra-title {
    font-weight: 500;
    letter-spacing: -0.015rem;
}
.card-specs dt,
.card-extra dt {
    font-weight: 500;
}
.card-specs dd,
.card-extra dd {
    margin: 0;
}
.card-actions {
    margin-top: 0.75rem;
}

.card-button {
    background: #1e293b;
    padding: 0.4rem 0.8rem;
    border-radius: 40px;
    font-size: 0.75rem;
}

.card-button:hover {
    background: #0f172a;
}

/* Кнопки уточнений (clarification) */

.clarification-question p {
    font-weight: 500;
    margin-bottom: 0;
    margin-top: 20px;
}

.clarification-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0.5rem 0;
}

.clarification-option {
    border: 0;
    background: #f7f7f7;
    color: #7e7e7e;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.clarification-option:hover {
    opacity: 0.7;
}

/* Индикатор печати (печатает) */
#typingIndicator {
    background: #f1f5f9;
    display: inline-block;
    width: auto;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    color: #475569;
    margin-left: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}

/* Метка агента – почти незаметна */
.message-meta {
    font-size: 12px;
    letter-spacing: 0.3px;
    opacity: 0.7;
    transition: opacity 0.2s;
    background-image: linear-gradient(90deg, #ff0080, #ff8c00, #ff0080);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

/* Блок "рассуждений" модели (если включены) */
.bubble-content .reasoning-block {
    border-left: 0px solid #dfdfdf;
    margin: 8px 0;
    font-size: 0.85rem;
    color: #959595;
}

.bubble-content .reasoning-block summary {
    cursor: pointer;
    margin-bottom: 4px;
}

.bubble-content .reasoning-block details {
    margin-top: 4px;
}

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

@media screen and (max-width: 380px) {
    .chat-title {
        display: none;
    }
}
@media screen and (max-width: 580px) {
    .chat-title {
        font-size: 14px;
        font-weight: 500;
        margin: 0;
        letter-spacing: -0.05rem;
        align-self: center;
    }
    .chat-messages {
        padding: 3px;
    }
    .bubble {
        padding: 1rem; 
    }
    .message-row.assistant .bubble {
    border-radius: 16px;
    padding: 0.5rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    background: none;
    line-height: normal;
    }
    .chat-header {
        padding: 7px 0 0 10px;
        height: 40px;
    }
    .composer-form {
        padding: 5px;
    }
    #welcome-message .welcome-message-meta {
        font-size: 1.5rem;
        margin-top: 3rem;
        margin-bottom: 10px;
        letter-spacing: -0.05rem;
    }
    #welcome-message .chip {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
    #welcome-message .message-row.assistant .bubble p {
        font-size: 0.9rem !important;
        letter-spacing: -0.05rem !important;
    }
    #welcome-message h2 {
        font-size: 1.25rem !important;
        line-height: normal !important;
        font-weight: 500 !important;
        letter-spacing: -0.05rem !important;
    }
}

@media (min-width: 581px) and (max-width: 1024px) {

}
@media screen and (max-width: 1024px) {
    .robosmart-sidepanel-container .side-panel,
    .robosmart-sidepanel-container .side-panel-content,
    .robosmart-sidepanel-container .side-panel-content-container,
    .robosmart-panel-wrapper,
    .robosmart-panel-page,
    .page,
    .layout,
    .chat {
        height: var(--robosmart-viewport-height, 100%) !important;
        max-height: var(--robosmart-viewport-height, 100%) !important;
        min-height: 0 !important;
    }

    .chat {
        display: flex;
        flex-direction: column;
    }
    .side-panel-labels {
        left: calc(100% - 3px) !important;
        top: 3px;
    }
    .chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .chat-btn-composser {
        display: block;
        width: auto;
        position: absolute;
        top: 3px;
        left: calc(100% - 90px) !important;
    }
    .composer {
        flex: 0 0 auto;
        width: calc(100% - 10px);
        padding: 5px;
        margin: 5px;
        bottom: 0;
    }

    .composer-textarea {
        padding: 0 0.5rem;
        font-size: 12px;
        line-height: normal;
    }
}
@media (min-width: 1025px) {

}

@media screen and (max-width: 1200px) {
    .assistant-chat-button {
        right: 5px;
    }
}