/* ==========================================================================
   Flatbot v2 – Styles
   Utilise EXCLUSIVEMENT les variables CSS de Flatboard pour une intégration
   parfaite avec tous les thèmes et le mode sombre natif ([data-theme="dark"]).
   ========================================================================== */

/* ─────────────────────────────────────────────────────────────────────────
   Bouton flottant
   ───────────────────────────────────────────────────────────────────────── */

.flatbot-button {
    position: fixed;
    z-index: 1040;
    border-radius: 50px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--primary-color) 35%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}
.flatbot-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px color-mix(in srgb, var(--primary-color) 50%, transparent);
}
.flatbot-button:active { transform: translateY(-1px); }
.flatbot-button i { font-size: 16px; }

.flatbot-bottom-right { bottom: 24px; right: 24px; }
.flatbot-bottom-left  { bottom: 24px; left: 24px; }
.flatbot-top-right    { top: 80px;    right: 24px; }
.flatbot-top-left     { top: 80px;    left: 24px; }

.flatbot-badge {
    position: absolute;
    top: -6px; right: -6px;
    font-size: 10px;
    min-width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────────────────────
   Modale Bootstrap
   ───────────────────────────────────────────────────────────────────────── */

.flatbot-dialog { max-width: 520px; width: 100%; margin: 0 auto; }

@media (max-width: 575px) {
    .flatbot-dialog { max-width: 100%; margin: auto 8px; }
}

.flatbot-modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-lg, 0 12px 48px rgba(0,0,0,.18));
    display: flex; flex-direction: column;
    height: 72vh; max-height: 680px;
    overflow: hidden;
    background-color: var(--bg-primary, #fff);
}

/* Header gradient primaire */
.flatbot-modal-header {
    border-radius: 16px 16px 0 0;
    padding: 14px 16px;
    border-bottom: none;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--bs-primary, #0d6efd), color-mix(in srgb, var(--bs-primary, #0d6efd) 80%, #000));
    color: var(--text-white, #fff);
}

.flatbot-bot-avatar-sm {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    color: var(--text-white, #fff);
}

.flatbot-status-text {
    font-size: 11px; display: block; line-height: 1; margin-top: 1px;
    color: rgba(255,255,255,.8);
}

.flatbot-header-btn {
    width: 30px; height: 30px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; border-radius: 8px;
    background: rgba(255,255,255,.2);
    border: none;
    color: var(--text-white, #fff);
    opacity: .9;
    transition: opacity .15s, background .15s;
}
.flatbot-header-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,.35);
    color: var(--text-white, #fff);
}

/* Zone messages */
.flatbot-messages-container {
    flex: 1; overflow: hidden; display: flex; flex-direction: column;
    background: var(--bg-secondary, #f8f9fa);
}

.flatbot-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    scroll-behavior: smooth;
    background: var(--bg-secondary, #f8f9fa);
}
.flatbot-messages::-webkit-scrollbar        { width: 4px; }
.flatbot-messages::-webkit-scrollbar-track  { background: transparent; }
.flatbot-messages::-webkit-scrollbar-thumb  { background: var(--border-color-light, #dee2e6); border-radius: 4px; }

/* Typing indicator */
.flatbot-typing-row {
    padding: 6px 16px;
    display: flex; align-items: center;
    background: var(--bg-secondary, #f8f9fa);
    min-height: 32px;
}
.flatbot-typing-dots { display: flex; gap: 3px; align-items: center; }
.flatbot-typing-dots span {
    width: 5px; height: 5px;
    background: var(--text-muted, #6c757d);
    border-radius: 50%;
    animation: aiTypingDot 1.4s infinite ease-in-out;
}
.flatbot-typing-dots span:nth-child(2) { animation-delay: .2s; }
.flatbot-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes aiTypingDot {
    0%,80%,100% { transform: scale(.6); opacity: .4; }
    40%         { transform: scale(1);  opacity: 1;  }
}

/* Footer */
.flatbot-footer {
    flex-shrink: 0;
    background: var(--bg-primary, #fff);
    border-top: 1px solid var(--border-color-light, #dee2e6);
    border-radius: 0 0 16px 16px;
    padding: 10px 12px !important;
}

.flatbot-input-row { display: flex; align-items: flex-end; gap: 6px; }

/* Boutons outils — s'adapte aux variables du thème */
.flatbot-tool-btn {
    flex-shrink: 0; width: 34px; height: 34px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 14px;
    border: 1px solid var(--border-color, #dee2e6);
    background: var(--bg-primary, #fff);
    color: var(--text-secondary, #6c757d);
    transition: border-color var(--transition-fast,.15s ease),
                color var(--transition-fast,.15s ease),
                background var(--transition-fast,.15s ease);
}
.flatbot-tool-btn:hover {
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
    background: var(--bg-secondary, #f8f9fa);
}

.flatbot-input {
    flex: 1; border-radius: 12px;
    border: 1px solid var(--border-color-light, #dee2e6);
    padding: 7px 12px; font-size: 14px; line-height: 1.4;
    resize: none; max-height: 120px; overflow-y: auto;
    transition: border-color .2s;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #212529);
}
.flatbot-input:focus {
    outline: none;
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #0d6efd) 15%, transparent);
}
.flatbot-input::placeholder { color: var(--text-muted, #6c757d); opacity: .7; }

.flatbot-send-btn {
    flex-shrink: 0; width: 34px; height: 34px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 14px;
    background: linear-gradient(135deg, var(--bs-primary, #0d6efd), color-mix(in srgb, var(--bs-primary, #0d6efd) 80%, #000));
    border: none;
    color: var(--text-white, #fff);
    transition: transform .15s;
}
.flatbot-send-btn:not(:disabled):hover { transform: scale(1.08); }
.flatbot-send-btn:disabled { opacity: .5; cursor: not-allowed; }

.flatbot-action-btn { font-size: 12px; padding: 3px 10px; border-radius: 8px; }

/* ─────────────────────────────────────────────────────────────────────────
   Messages
   ───────────────────────────────────────────────────────────────────────── */

.ai-msg { display: flex; flex-direction: column; max-width: 85%; animation: aiMsgIn .2s ease; }
@keyframes aiMsgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-msg-bot,
.ai-msg-user  { align-self: flex-start; }
.ai-msg-own   { align-self: flex-end; }
.ai-msg-error { align-self: center; }

.ai-msg-inner { display: flex; align-items: flex-start; gap: 8px; }
.ai-msg-own .ai-msg-inner { flex-direction: row-reverse; }

.ai-msg-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ai-msg-avatar--bot {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative;
    font-size: 22px;
    color: var(--bs-primary, #0d6efd);
}
.ai-msg-avatar--bot .fa-robot {
    font-size: 22px;
    color: var(--bs-primary, #0d6efd);
}
.ai-msg-avatar--bot .status-dot {
    width: 10px !important;
    height: 10px !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 50% !important;
    border: 2px solid var(--bg-primary, #fff) !important;
    display: block !important;
    background-color: #28a745 !important;
}

/* Wrapper pour le dot avatar natif Flatboard (avatar + badge groupe + status dot) */
.ai-msg-avatar--dot {
    flex-shrink: 0;
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-block;
}
.ai-msg-avatar--dot .avatar-dot {
    width: 40px !important;
    height: 40px !important;
}
.ai-msg-avatar--dot .avatar-dot img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover;
}
/* Le status-dot est positionné en absolu par le CSS natif Flatboard */
/* Fallback au cas où le CSS core ne serait pas chargé */
.ai-msg-avatar--dot .status-dot {
    width: 10px !important;
    height: 10px !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 50% !important;
    border: 2px solid var(--bg-primary, #fff) !important;
    display: block !important;
}
.ai-msg-avatar--dot .status-dot.online  { background-color: #28a745 !important; }
.ai-msg-avatar--dot .status-dot.offline { background-color: #6c757d !important; }
/* Le badge groupe est positionné en absolu par le CSS natif Flatboard */

.ai-msg-body { display: flex; flex-direction: column; gap: 2px; max-width: 100%; }

.ai-msg-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--text-muted, #6c757d); margin-bottom: 2px;
}
.ai-msg-own .ai-msg-meta { justify-content: flex-end; }
.ai-msg-name  { font-weight: 600; color: var(--text-secondary, #495057); }
.ai-msg-time  { font-size: 10px; color: var(--text-muted, #6c757d); }

.ai-msg-delete {
    background: none; border: none;
    color: var(--danger-color, #dc3545);
    cursor: pointer; padding: 0 2px; font-size: 10px;
    opacity: 0; transition: opacity .15s; line-height: 1;
}
.ai-msg:hover .ai-msg-delete { opacity: .7; }
.ai-msg-delete:hover          { opacity: 1 !important; }

/* Bulles */
.ai-msg-content {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color-light, #dee2e6);
    border-radius: 14px 14px 14px 4px;
    padding: 8px 12px; font-size: 14px; line-height: 1.5;
    color: var(--text-primary, #212529);
    word-break: break-word;
}
.ai-msg-bot .ai-msg-content {
    background: color-mix(in srgb, var(--primary-color, #0d6efd) 6%, var(--bg-primary, #fff));
    border-color: color-mix(in srgb, var(--primary-color, #0d6efd) 20%, transparent);
    border-radius: 4px 14px 14px 14px;
}
.ai-msg-own .ai-msg-content {
    background: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
    color: var(--text-white, #fff);
    border-radius: 14px 14px 4px 14px;
}
.ai-msg-error .ai-msg-content {
    background: color-mix(in srgb, var(--danger-color, #dc3545) 10%, var(--bg-primary, #fff));
    border-color: var(--danger-color, #dc3545);
    color: var(--danger-color, #dc3545);
    border-radius: 8px; font-size: 13px;
}

/* Markdown dans bulles */
.ai-msg-content p:last-child  { margin-bottom: 0; }
.ai-msg-content p:first-child { margin-top: 0; }
.ai-msg-content code {
    font-size: 12px;
    background: var(--bg-tertiary, #e9ecef);
    color: var(--bs-primary, #0d6efd);
    padding: 1px 5px; border-radius: 4px;
}
/* Bloc pre — fond sombre du thème, pas une couleur externe */
.ai-msg-content pre {
    background: var(--bg-dark, #2c3e50);
    color: var(--text-white, #fff);
    border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 12px;
    border-left: 3px solid var(--bs-primary, #0d6efd);
}
.ai-msg-content pre code { background: none; padding: 0; color: inherit; }
.ai-msg-content a.ai-chat-link { color: var(--bs-primary, #0d6efd); text-decoration: underline; }
.ai-msg-content ul { padding-left: 18px; margin-bottom: 4px; }
.ai-msg-content strong { font-weight: 700; }

/* Bienvenue */
.ai-welcome { text-align: center; padding: 32px 16px; color: var(--text-muted, #6c757d); }
.ai-welcome-icon { font-size: 48px; margin-bottom: 12px; }
.ai-welcome-text { font-size: 14px; line-height: 1.5; max-width: 280px; margin: 0 auto; color: var(--text-muted, #6c757d); }

/* Loading dots */
.ai-msg-loading .ai-msg-content { background: transparent; border-color: transparent; padding: 4px 0; }
.ai-loading-dots {
    display: flex; gap: 4px; align-items: center;
    padding: 6px 10px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color-light, #dee2e6);
    border-radius: 4px 14px 14px 14px;
    width: fit-content;
}
.ai-loading-dots span {
    width: 6px; height: 6px;
    background: var(--bs-primary, #0d6efd);
    border-radius: 50%;
    animation: aiTypingDot 1.4s infinite ease-in-out;
}
.ai-loading-dots span:nth-child(2) { animation-delay: .2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: .4s; }

/* ─────────────────────────────────────────────────────────────────────────
   Emoji picker
   ───────────────────────────────────────────────────────────────────────── */

.ai-emoji-picker {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color-light, #dee2e6);
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,.15));
    padding: 10px;
    display: grid; grid-template-columns: repeat(8, 32px); gap: 4px;
    width: 296px; max-height: 240px; overflow-y: auto;
}
.ai-emoji-btn {
    width: 32px; height: 32px;
    border: none; background: none; cursor: pointer;
    font-size: 18px; border-radius: 6px;
    transition: background var(--transition-fast, .15s ease);
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.ai-emoji-btn:hover { background: var(--bg-secondary, #f8f9fa); }

/* ─────────────────────────────────────────────────────────────────────────
   Vue plein écran (/flatbot)
   ───────────────────────────────────────────────────────────────────────── */

.flatbot-fullscreen-container {
    display: flex; flex-direction: column;
    height: calc(100vh - 130px);
    background: var(--bg-primary, #fff);
    border-radius: 16px;
    box-shadow: var(--shadow-lg, 0 8px 40px rgba(0,0,0,.1));
    border: 1px solid var(--border-color-light, #dee2e6);
    overflow: hidden;
}

.flatbot-fullscreen-header {
    background: linear-gradient(135deg, var(--bs-primary, #0d6efd), color-mix(in srgb, var(--bs-primary, #0d6efd) 80%, #000));
    color: var(--text-white, #fff);
    padding: 20px 24px;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.flatbot-fullscreen-title {
    margin: 0; font-size: 22px; font-weight: 700;
    display: flex; align-items: center; gap: 12px;
    color: var(--text-white, #fff);
}
.flatbot-fullscreen-actions { display: flex; gap: 10px; }
.flatbot-fullscreen-btn {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
    color: var(--text-white, #fff);
    padding: 8px 16px; border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 6px;
    transition: background .2s;
}
.flatbot-fullscreen-btn:hover { background: rgba(255,255,255,.35); color: var(--text-white, #fff); }

.flatbot-fullscreen-messages-container {
    flex: 1; overflow: hidden; display: flex; flex-direction: column;
    background: var(--bg-secondary, #f8f9fa);
}
.flatbot-fullscreen-messages {
    flex: 1; overflow-y: auto; padding: 24px;
    display: flex; flex-direction: column; gap: 14px;
    scroll-behavior: smooth;
}

.flatbot-fullscreen-footer {
    padding: 16px 24px;
    background: var(--bg-primary, #fff);
    border-top: 1px solid var(--border-color-light, #dee2e6);
    flex-shrink: 0;
}
.flatbot-fullscreen-input-container {
    display: flex; gap: 10px; align-items: flex-end; margin-bottom: 12px;
}
.flatbot-fullscreen-input {
    flex: 1;
    border: 2px solid var(--border-color-light, #dee2e6);
    border-radius: 12px; padding: 12px 16px; font-size: 15px;
    resize: none; max-height: 150px;
    transition: border-color .2s, box-shadow .2s;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #212529);
}
.flatbot-fullscreen-input:focus {
    outline: none;
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #0d6efd) 15%, transparent);
}
.flatbot-fullscreen-input::placeholder { color: var(--text-muted, #6c757d); opacity: .7; }

.flatbot-fullscreen-emoji-btn,
.flatbot-fullscreen-flatbot-btn {
    flex-shrink: 0; width: 44px; height: 44px;
    border: 2px solid var(--border-color-light, #dee2e6);
    background: var(--bg-primary, #fff);
    border-radius: 12px; cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .2s, color .2s, background .2s;
    color: var(--text-secondary, #495057);
}
/* Bouton @Flatbot utilise la variable info du thème */
.flatbot-fullscreen-flatbot-btn {
    gap: 6px; width: auto; padding: 0 14px;
    font-size: 14px; font-weight: 500;
    color: var(--info-color, #0dcaf0);
    border-color: var(--info-color, #0dcaf0);
}
.flatbot-fullscreen-emoji-btn:hover,
.flatbot-fullscreen-flatbot-btn:hover {
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
    background: var(--bg-secondary, #f8f9fa);
}

.flatbot-fullscreen-send-btn {
    flex-shrink: 0; height: 44px; padding: 0 22px;
    background: linear-gradient(135deg, var(--bs-primary, #0d6efd), color-mix(in srgb, var(--bs-primary, #0d6efd) 80%, #000));
    border: none; color: var(--text-white, #fff); border-radius: 12px; cursor: pointer;
    font-size: 15px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    transition: transform .15s, opacity .15s;
}
.flatbot-fullscreen-send-btn:hover:not(:disabled) { transform: scale(1.03); }
.flatbot-fullscreen-send-btn:disabled { opacity: .5; cursor: not-allowed; }

.flatbot-fullscreen-actions-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.flatbot-fullscreen-action-btn {
    background: transparent;
    border: 1px solid var(--border-color-light, #dee2e6);
    color: var(--text-secondary, #495057);
    padding: 8px 16px; border-radius: 8px; cursor: pointer;
    font-size: 13px; display: flex; align-items: center; gap: 6px;
    transition: border-color .2s, color .2s, background .2s;
}
.flatbot-fullscreen-action-btn:hover {
    background: var(--bg-secondary, #f8f9fa);
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
}

#flatbot-fullscreen-typing-indicator {
    padding: 6px 24px; font-size: 12px;
    color: var(--text-muted, #6c757d);
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-secondary, #f8f9fa);
}

/* ─────────────────────────────────────────────────────────────────────────
   Mode sombre — Flatboard utilise [data-theme="dark"] sur <html>
   ⚠️  On n'utilise PAS @media (prefers-color-scheme: dark) : Flatboard gère
       son propre toggle indépendamment des préférences OS.
       Les variables --bg-primary, --text-primary, etc. sont automatiquement
       remappées par le thème en mode sombre ; la plupart des surcharges
       ci-dessous sont donc redondantes mais garantissent la compatibilité
       avec les thèmes personnalisés qui n'utiliseraient pas les variables.
   ───────────────────────────────────────────────────────────────────────── */

[data-theme="dark"] .flatbot-modal-content,
[data-theme="dark"] .flatbot-fullscreen-container {
    background: var(--bg-primary, #1a1a1a);
    border-color: var(--border-color, #333333);
}

[data-theme="dark"] .flatbot-messages-container,
[data-theme="dark"] .flatbot-messages,
[data-theme="dark"] .flatbot-fullscreen-messages-container,
[data-theme="dark"] .flatbot-typing-row,
[data-theme="dark"] #flatbot-fullscreen-typing-indicator {
    background: var(--bg-secondary, #121212);
}

[data-theme="dark"] .flatbot-footer,
[data-theme="dark"] .flatbot-fullscreen-footer {
    background: var(--bg-primary, #1a1a1a);
    border-top-color: var(--border-color, #333333);
}

/* Inputs en mode sombre */
[data-theme="dark"] .flatbot-input,
[data-theme="dark"] .flatbot-fullscreen-input {
    background: var(--bg-secondary, #121212);
    border-color: var(--border-color, #333333);
    color: var(--text-primary, #e0e0e0);
}
[data-theme="dark"] .flatbot-input::placeholder,
[data-theme="dark"] .flatbot-fullscreen-input::placeholder {
    color: var(--text-muted, #606060);
}

/* Boutons outils en mode sombre */
[data-theme="dark"] .flatbot-tool-btn,
[data-theme="dark"] .flatbot-fullscreen-emoji-btn,
[data-theme="dark"] .flatbot-fullscreen-flatbot-btn {
    background: var(--bg-secondary, #121212);
    border-color: var(--border-color, #333333);
    color: var(--text-secondary, #b0b0b0);
}

/* Bulles de messages en mode sombre */
[data-theme="dark"] .ai-msg-content {
    background: var(--bg-tertiary, #2a2a2a);
    border-color: var(--border-color, #333333);
    color: var(--text-primary, #e0e0e0);
}
[data-theme="dark"] .ai-msg-bot .ai-msg-content {
    background: color-mix(in srgb, var(--primary-color, #0d6efd) 12%, var(--bg-tertiary, #2a2a2a));
    border-color: color-mix(in srgb, var(--primary-color, #0d6efd) 25%, transparent);
}
/* Code inline en mode sombre */
[data-theme="dark"] .ai-msg-content code {
    background: var(--bg-darker, #0d0d0d);
    color: var(--info-color, #0dcaf0);
}
/* Emoji picker en mode sombre */
[data-theme="dark"] .ai-emoji-picker {
    background: var(--bg-secondary, #121212);
    border-color: var(--border-color, #333333);
}
[data-theme="dark"] .ai-emoji-btn:hover {
    background: var(--bg-tertiary, #2a2a2a);
}
/* Actions bar en mode sombre */
[data-theme="dark"] .flatbot-fullscreen-action-btn {
    border-color: var(--border-color, #333333);
    color: var(--text-secondary, #b0b0b0);
}
[data-theme="dark"] .flatbot-fullscreen-action-btn:hover {
    background: var(--bg-tertiary, #2a2a2a);
}
/* Loading dots en mode sombre */
[data-theme="dark"] .ai-loading-dots {
    background: var(--bg-tertiary, #2a2a2a);
    border-color: var(--border-color, #333333);
}

/* ─────────────────────────────────────────────────────────────────────────
   Séparateur de date
   ───────────────────────────────────────────────────────────────────────── */

.ai-date-separator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 1rem;
    color: var(--text-muted, #6c757d);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    user-select: none;
}
.ai-date-separator::before,
.ai-date-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #dee2e6);
}
[data-theme="dark"] .ai-date-separator::before,
[data-theme="dark"] .ai-date-separator::after {
    background: var(--border-color, #444);
}

/* ─────────────────────────────────────────────────────────────────────────
   Responsive mobile
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 576px) {
    .flatbot-button .flatbot-btn-text { display: none !important; }
    .flatbot-button { border-radius: 50%; width: 52px; height: 52px; padding: 0; justify-content: center; }
    .flatbot-bottom-right { bottom: 16px; right: 16px; }
    .flatbot-bottom-left  { bottom: 16px; left: 16px; }

    .flatbot-fullscreen-container { height: calc(100vh - 80px); }
    .flatbot-fullscreen-title { font-size: 16px; }
    .flatbot-fullscreen-btn span { display: none; }
    .flatbot-fullscreen-actions-bar { flex-wrap: wrap; }

    .ai-msg { max-width: 92%; }
    .ai-emoji-picker { grid-template-columns: repeat(6, 32px); width: 228px; }
}
