.chatbot-mistral-v2 {
    max-width: 820px;
    margin: 24px auto;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 560px;
}

.chatbot-mistral-v2__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e6e6e6;
}

.chatbot-mistral-v2__header h2 {
    margin: 0;
    font-size: 20px;
}

.chatbot-mistral-v2__close {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
}

.chatbot-mistral-v2__messages {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: #fafafa;
}

.chatbot-mistral-v2__msg {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ececec;
    background: #fff;
}

.chatbot-mistral-v2__msg--assistant {
    border-left: 4px solid #2997d8;
}

.chatbot-mistral-v2__msg--user {
    border-left: 4px solid #64a338;
}

.chatbot-mistral-v2__badge {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 6px;
}

.chatbot-mistral-v2__text {
    white-space: pre-wrap;
    word-break: break-word;
}

.chatbot-mistral-v2__composer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e6e6e6;
    background: #fff;
}

.chatbot-mistral-v2__composer textarea {
    flex: 1;
    resize: vertical;
    min-height: 64px;
}

.chatbot-mistral-v2__composer button {
    align-self: flex-end;
    padding: 8px 16px;
}

.chatbot-mistral-v2__status {
    margin: 0;
    min-height: 20px;
    padding: 0 16px 12px 16px;
    color: #4b4b4b;
}

.chatbot-mistral-v2__status--error {
    color: #b42318;
}

/* Namespaced only: no stylesheet overrides for the active legacy storefront. */
.chatbot-mistral-v2-widget[hidden], .chatbot-mistral-v2[hidden] { display: none !important; }
.chatbot-mistral-v2-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 1001; border-radius: 22px; padding: 12px 18px; background: #007cad; color: white; }
.chatbot-mistral-v2--popup { position: fixed; right: 20px; bottom: 76px; z-index: 1002; width: min(410px, calc(100vw - 32px)); height: min(580px, calc(100dvh - 110px)); min-height: 280px; margin: 0; }
.chatbot-mistral-v2--popup.technical-mode { width: min(630px, calc(100vw - 32px)); }
.chatbot-mistral-v2--popup .chatbot-mistral-v2__messages { min-height: 0; }
.chatbot-mistral-v2--popup .chatbot-mistral-v2__header h2 { font-size: 16px; }
.chatbot-mistral-v2__notice { font-size: 12px; padding: 8px 16px; margin: 0; }
.chatbot-mistral-v2__text.chat-md { white-space: normal; }
.chatbot-mistral-v2__text.chat-md p { margin: 0 0 8px; }
.chatbot-mistral-v2__text.chat-md ul, .chatbot-mistral-v2__text.chat-md ol { margin: 0 0 8px; padding-left: 22px; }
.chatbot-mistral-v2__text.chat-md li { list-style: inherit; margin-bottom: 4px; }
.chatbot-mistral-v2__text.chat-md code { background: #eef1f4; padding: 1px 4px; border-radius: 4px; }
.chatbot-mistral-v2__text.chat-md pre { white-space: pre; overflow-x: auto; background: #eef1f4; padding: 8px; }
.chatbot-mistral-v2__text.chat-md blockquote { border-left: 3px solid #d5dbe1; padding-left: 10px; margin: 0 0 8px; }
.chatbot-mistral-v2__text.chat-md a { overflow-wrap: anywhere; }
.chatbot-mistral-v2__text.chat-md > :last-child { margin-bottom: 0; }
.chatbot-mistral-v2__messages [data-role="operation-offer"] { padding: 12px; border: 1px solid #becbd8; border-radius: 6px; margin-bottom: 12px; }
.chatbot-mistral-v2__messages [data-role="operation-offer"] button { margin-right: 8px; }
.chatbot-mistral-v2__rights { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 5px; border-top: 1px solid #ddd; }
.chatbot-mistral-v2__rights button { font-size: 11px; padding: 4px 6px; }
@media (max-width: 480px) { .chatbot-mistral-v2--popup { right: 16px; bottom: 72px; } .chatbot-mistral-v2__composer { padding: 10px; } }

/* The public widget reuses the original theme's chat-wrap/live-contact-btn rules,
   rather than introducing a second launcher or panel design during provider migration. */
.chatbot-mistral-v2--original-storefront[hidden] { display: none !important; }
.chatbot-mistral-v2--original-storefront [hidden] { display: none !important; }
.chatbot-mistral-v2--original-storefront .chatbot-mistral-v2__text { white-space: pre-line; word-break: normal; }
.chatbot-mistral-v2--original-storefront .chatbot-mistral-v2__status { display: none; }
.chatbot-mistral-v2--original-storefront .chatbot-mistral-v2__status--error { display: block; }
.chatbot-mistral-v2--original-storefront .message.chat-md { white-space: normal; }
.chatbot-mistral-v2--original-storefront .message.chat-md > :last-child { margin-bottom: 0; }
.chatbot-mistral-v2--original-storefront .message.chat-md p { margin: 0 0 8px; }
.chatbot-mistral-v2--original-storefront .message.chat-md ul,
.chatbot-mistral-v2--original-storefront .message.chat-md ol { margin: 0 0 8px; padding-left: 22px; }
.chatbot-mistral-v2--original-storefront .message.chat-md li { margin: 0 0 4px; list-style: inherit; }
.chatbot-mistral-v2--original-storefront .message.chat-md li:last-child { margin-bottom: 0; }
.chatbot-mistral-v2--original-storefront .message.chat-md li > ul { margin: 4px 0 0; }
.chatbot-mistral-v2--original-storefront .message.chat-md strong { font-weight: 600; }
.chatbot-mistral-v2--original-storefront .message.chat-md code { font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: .88em; background: #eef1f4; border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.chatbot-mistral-v2--original-storefront .message.chat-md pre { margin: 0 0 8px; padding: 8px 10px; background: #eef1f4; border-radius: 6px; overflow-x: auto; white-space: pre; }
.chatbot-mistral-v2--original-storefront .message.chat-md pre code { padding: 0; background: none; font-size: .85em; }
.chatbot-mistral-v2--original-storefront .message.chat-md blockquote { margin: 0 0 8px; padding: 2px 0 2px 10px; border-left: 3px solid #d5dbe1; color: #555; }
.chatbot-mistral-v2--original-storefront .message.chat-md hr { border: 0; border-top: 1px solid #e3e3e3; margin: 8px 0; }
.chatbot-mistral-v2--original-storefront .message.chat-md a { overflow-wrap: anywhere; }
