/**
 * Bolt AI Assist — Chat Component Styles
 * Adapted from bolt-ai-assist/src/index.css
 *
 * Covers:
 *  1. Floating chat bubble + mini window (all non-assistant pages)
 *  2. Full-page assistant layout (assistant.html)
 */

/* ================================================================
   1. FLOATING BUBBLE
   ================================================================ */

#bolt-bubble-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    /* width matches the button so the abs-positioned window is anchored correctly */
    width: 220px;
}

#bolt-bubble-btn {
    min-width: 220px;
    min-height: 74px;
    padding: 0.85rem 1rem 0.85rem 1.15rem;
    border-radius: 999px;
    background: #1a202c;
    border: 2px solid rgba(234, 179, 8, 0.5);
    color: #eab308;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
    position: relative;
    flex-shrink: 0;
    line-height: 1;
}

.bolt-bubble-label {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: left;
    line-height: 1.25;
}

.bolt-bubble-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(234, 179, 8, 0.14);
    color: #eab308;
    font-size: 1.9rem;
    flex-shrink: 0;
}

#bolt-bubble-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(234, 179, 8, 0.15);
    background: #252d40;
}

#bolt-bubble-btn:active { transform: translateY(0); }

#bolt-bubble-btn.is-open {
    background: #1e2a3a;
    border-color: #eab308;
}

.bolt-unread-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f1629;
}

/* ── Mini Chat Window ──────────────────────────────────────────── */

#bolt-chat-window {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    right: 0;
    width: 360px;
    height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#bolt-chat-window.bolt-hidden { display: none; }

.boltcw-header {
    background: #161d35;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(234, 179, 8, 0.2);
}

.boltcw-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #f1f5f9;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
}

.boltcw-title-icon { color: #eab308; }

.boltcw-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.boltcw-action-btn {
    background: none;
    border: 1px solid transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.28rem 0.45rem;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    white-space: nowrap;
}

.boltcw-action-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.1);
}

.boltcw-expand-btn {
    color: #eab308 !important;
    border-color: rgba(234, 179, 8, 0.35) !important;
    font-size: 0.72rem;
}

.boltcw-expand-btn:hover {
    background: rgba(234, 179, 8, 0.12) !important;
    border-color: rgba(234, 179, 8, 0.6) !important;
}

/* Messages area */
.boltcw-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: #f8fafc;
    scroll-behavior: smooth;
}

.boltcw-messages::-webkit-scrollbar { width: 4px; }
.boltcw-messages::-webkit-scrollbar-track { background: transparent; }
.boltcw-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* Individual messages */
.bolt-msg {
    max-width: 87%;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.82rem;
    line-height: 1.55;
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    word-break: break-word;
}

.bolt-msg-user {
    background: #1a202c;
    color: #f1f5f9;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.bolt-msg-model {
    background: #fff;
    color: #1e293b;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 3px;
}

/* Typing indicator */
.bolt-msg-typing {
    background: #fff;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    padding: 0.6rem 0.85rem;
}

.bolt-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bolt-typing-dots span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: boltTypingBounce 1.2s infinite ease-in-out;
}

.bolt-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.bolt-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes boltTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Welcome state */
.boltcw-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 1.5rem;
    gap: 0.4rem;
}

.boltcw-welcome-icon { font-size: 2rem; margin-bottom: 0.25rem; }

.boltcw-welcome h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.boltcw-welcome p {
    font-size: 0.77rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

/* Input row */
.boltcw-input-area {
    padding: 0.7rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-shrink: 0;
}

.boltcw-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: #1e293b;
    resize: none;
    outline: none;
    max-height: 100px;
    min-height: 34px;
    line-height: 1.5;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s;
}

.boltcw-input:focus {
    border-color: #eab308;
    background: #fff;
}

.boltcw-input::placeholder { color: #94a3b8; }

.boltcw-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #1a202c;
    border: none;
    color: #eab308;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.boltcw-send-btn:hover { background: #252d40; }
.boltcw-send-btn:active { transform: scale(0.94); }
.boltcw-send-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ================================================================
   2. FULL-PAGE ASSISTANT (assistant.html)
   ================================================================ */

.assistant-layout {
    display: flex;
    gap: 1.25rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Sidebar */
.assistant-sidebar {
    width: 210px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.assistant-sidebar::-webkit-scrollbar { width: 3px; }
.assistant-sidebar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.assistant-new-btn {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: #1a202c;
    border: none;
    color: #eab308;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.assistant-new-btn:hover { background: #252d40; }
.assistant-new-btn:active { transform: scale(0.98); }

.assistant-clear-btn {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    background: none;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.assistant-clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.assistant-sidebar-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.assistant-quick-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.assistant-quick-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    color: #475569;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    line-height: 1.4;
    width: 100%;
}

.assistant-quick-btn:hover {
    background: #fef9e7;
    border-color: rgba(234, 179, 8, 0.45);
    color: #1e293b;
}

/* Main chat panel */
.assistant-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    min-width: 0;
    min-height: 0;
}

.assistant-chat-header {
    padding: 0.8rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.assistant-chat-header-icon { color: #eab308; font-size: 1.1rem; }

.assistant-chat-header-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
}

.assistant-chat-header-sub {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: auto;
    font-family: 'Inter', sans-serif;
}

/* Messages */
.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
    min-height: 0;
}

.assistant-messages::-webkit-scrollbar { width: 6px; }
.assistant-messages::-webkit-scrollbar-track { background: transparent; }
.assistant-messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }
.assistant-messages::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* Full-page message bubbles */
.bolt-msg-full {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 78%;
}

.bolt-msg-full-user { align-self: flex-end; align-items: flex-end; }
.bolt-msg-full-model { align-self: flex-start; align-items: flex-start; }

.bolt-msg-full-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    padding: 0 0.3rem;
    font-family: 'Inter', sans-serif;
}

.bolt-msg-full-bubble {
    border-radius: 14px;
    padding: 0.8rem 1.1rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.65;
    word-break: break-word;
}

.bolt-msg-full-user .bolt-msg-full-bubble {
    background: #1a202c;
    color: #f1f5f9;
    border-bottom-right-radius: 4px;
}

.bolt-msg-full-model .bolt-msg-full-bubble {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* Markdown rendering inside model bubbles */
.bolt-msg-full-bubble p { margin: 0 0 0.6rem; }
.bolt-msg-full-bubble p:last-child { margin-bottom: 0; }
.bolt-msg-full-bubble ul,
.bolt-msg-full-bubble ol { padding-left: 1.35rem; margin: 0.5rem 0; }
.bolt-msg-full-bubble li { margin-bottom: 0.3rem; }
.bolt-msg-full-bubble strong { font-weight: 700; }
.bolt-msg-full-bubble em { font-style: italic; }
.bolt-msg-full-bubble code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.82em;
    background: #e2e8f0;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}
.bolt-msg-full-bubble h1,
.bolt-msg-full-bubble h2,
.bolt-msg-full-bubble h3 {
    font-weight: 700;
    margin: 0.75rem 0 0.35rem;
    line-height: 1.3;
}
.bolt-msg-full-bubble h1:first-child,
.bolt-msg-full-bubble h2:first-child,
.bolt-msg-full-bubble h3:first-child { margin-top: 0; }

/* Typing indicator full page */
.bolt-typing-full {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 78%;
}

.bolt-typing-full .bolt-msg-full-bubble {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* Welcome state */
.assistant-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.assistant-welcome-icon { font-size: 3rem; margin-bottom: 1rem; }

.assistant-welcome h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.assistant-welcome p {
    font-size: 0.875rem;
    max-width: 360px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

/* Input area */
.assistant-input-area {
    padding: 1rem 1.25rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.assistant-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.assistant-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    resize: none;
    outline: none;
    line-height: 1.55;
    max-height: 140px;
    min-height: 48px;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.assistant-input:focus {
    border-color: #eab308;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.assistant-input::placeholder { color: #94a3b8; }

.assistant-send-btn {
    height: 48px;
    padding: 0 1.25rem;
    border-radius: 12px;
    background: #1a202c;
    border: none;
    color: #eab308;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
    white-space: nowrap;
}

.assistant-send-btn:hover { background: #252d40; }
.assistant-send-btn:active { transform: scale(0.97); }
.assistant-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.assistant-input-hint {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 0.4rem;
    text-align: right;
    font-family: 'Inter', sans-serif;
}

/* ================================================================
   3. CONVERSATION SIDEBAR + NEW CONTEXT FEATURES
   ================================================================ */

/* Mobile drawer toggle */
.conv-mobile-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    margin-bottom: 0.75rem;
    transition: all 0.15s;
    flex-shrink: 0;
}
.conv-mobile-toggle:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Mobile overlay */
.conv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
}
.conv-overlay.conv-overlay-visible { display: block; }

/* Sidebar container */
.conv-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    min-height: 0;
}

.conv-sidebar-hd {
    padding: 0.75rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #f1f5f9;
}

.conv-sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.conv-sidebar-close-btn:hover { color: #475569; background: #e2e8f0; }

.conv-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.conv-sidebar-body::-webkit-scrollbar { width: 3px; }
.conv-sidebar-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

.conv-sidebar-ft {
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    background: #f8fafc;
}

/* Sections */
.conv-section { display: flex; flex-direction: column; gap: 0.35rem; }

.conv-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 0 0.1rem;
}

/* Conversation entry list */
.conv-list { display: flex; flex-direction: column; gap: 0.2rem; }

.conv-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-left: 3px solid transparent;
}
.conv-entry:hover { background: #edf2f7; }
.conv-entry-active {
    border-left-color: #eab308;
    background: rgba(234,179,8,0.07);
}

.conv-entry-icon { font-size: 0.8rem; flex-shrink: 0; width: 18px; text-align: center; }

.conv-entry-body { flex: 1; min-width: 0; }

.conv-entry-title {
    font-size: 0.77rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Inter', sans-serif;
}

.conv-entry-time {
    font-size: 0.63rem;
    color: #94a3b8;
    margin-top: 0.1rem;
    font-family: 'Inter', sans-serif;
}

.conv-entry-actions {
    display: flex;
    gap: 0.1rem;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.conv-entry:hover .conv-entry-actions { opacity: 1; }

.conv-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1;
    color: #94a3b8;
    transition: color 0.15s, background 0.15s;
}
.conv-action-btn:hover { background: #e2e8f0; color: #475569; }
.conv-action-star-active { color: #eab308; }
.conv-action-star-active:hover { color: #ca8a04 !important; background: #fef9e7 !important; }
.conv-action-delete:hover { color: #ef4444 !important; background: #fef2f2 !important; }

.conv-empty {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-family: 'Inter', sans-serif;
    font-style: italic;
}

.conv-save-limit-msg {
    font-size: 0.71rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    margin-top: 0.3rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.45;
}

/* New Chat button in sidebar footer */
.conv-new-chat-btn {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: #1a202c;
    border: none;
    color: #eab308;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, transform 0.1s;
}
.conv-new-chat-btn:hover { background: #252d40; }
.conv-new-chat-btn:active { transform: scale(0.98); }

/* Past conversation banner */
.conv-view-banner {
    background: #fef9e7;
    border-bottom: 1px solid rgba(234,179,8,0.35);
    padding: 0.65rem 1.25rem;
    flex-shrink: 0;
}
.conv-view-banner-hidden { display: none; }

.conv-view-banner-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.conv-view-banner-text {
    font-size: 0.8rem;
    color: #78350f;
    font-family: 'Inter', sans-serif;
    flex: 1;
    min-width: 0;
}

.conv-view-banner-btns { display: flex; gap: 0.5rem; flex-shrink: 0; }

.conv-banner-btn-primary {
    padding: 0.38rem 0.85rem;
    border-radius: 8px;
    background: #1a202c;
    border: none;
    color: #eab308;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.conv-banner-btn-primary:hover { background: #252d40; }

.conv-banner-btn-secondary {
    padding: 0.38rem 0.85rem;
    border-radius: 8px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.conv-banner-btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }

/* New Context Question */
.new-context-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.new-context-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.74rem;
    color: #94a3b8;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    user-select: none;
    transition: color 0.15s;
}
.new-context-label:hover { color: #64748b; }
.new-context-label.new-context-active { color: #0d9488; }

.new-context-checkbox {
    width: 13px;
    height: 13px;
    cursor: pointer;
    accent-color: #0d9488;
    flex-shrink: 0;
}

.new-context-info-icon {
    font-size: 0.78rem;
    color: #94a3b8;
    cursor: help;
    line-height: 1;
    flex-shrink: 0;
}

.new-context-hint {
    font-size: 0.7rem;
    color: #0d9488;
    font-family: 'Inter', sans-serif;
    font-style: italic;
    width: 100%;
    padding-left: 0.1rem;
}

/* New Context divider in messages */
.conv-ctx-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0;
    margin: 0.2rem 0;
    align-self: stretch;
}
.conv-ctx-divider::before,
.conv-ctx-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.conv-ctx-divider span {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

/* ================================================================
   4. MOBILE RESPONSIVE
   ================================================================ */

@media (max-width: 480px) {
    #bolt-bubble-wrap {
        bottom: 1rem;
        right: 1rem;
        width: calc(100vw - 2rem);
        max-width: 220px;
    }

    #bolt-bubble-btn {
        min-width: 0;
        width: 100%;
        min-height: 66px;
        padding: 0.75rem 0.9rem 0.75rem 1rem;
    }

    .bolt-bubble-label {
        font-size: 0.82rem;
    }

    .bolt-bubble-icon {
        width: 42px;
        height: 42px;
        font-size: 1.7rem;
    }

    /* On mobile the window breaks out of the fixed parent */
    #bolt-chat-window {
        position: fixed;
        bottom: 4.5rem;
        left: 1rem;
        right: 1rem;
        width: auto;
        height: 68vh;
        max-height: 480px;
    }
}

@media (max-width: 768px) {
    .assistant-layout {
        flex-direction: column;
    }

    .assistant-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        overflow: visible;
        gap: 0.5rem;
    }

    .assistant-new-btn,
    .assistant-clear-btn {
        width: auto;
        flex: 1;
        min-width: 120px;
    }

    .assistant-sidebar-label { display: none; }

    .assistant-quick-list {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .assistant-quick-btn {
        flex: 1 1 auto;
    }

    .assistant-main {
        min-height: 55vh;
    }

    .bolt-msg-full {
        max-width: 95%;
    }

    /* Conversation sidebar becomes fixed drawer on mobile */
    .conv-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 260px;
        z-index: 200;
        border-radius: 0 16px 16px 0;
        border-left: none;
        transition: left 0.3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    .conv-sidebar.conv-sidebar-open { left: 0; }
    .conv-sidebar-close-btn { display: block; }
    .conv-mobile-toggle { display: flex; }

    .conv-view-banner-inner { flex-direction: column; align-items: flex-start; }
    .conv-view-banner-btns { width: 100%; }
    .conv-banner-btn-primary,
    .conv-banner-btn-secondary { flex: 1; text-align: center; }
}
