/* Global Chat Interface Styles */

.chat-widget {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Enlarged (Workspace) Mode - Default */
.chat-widget.enlarged, 
#ai-chat-window {
    width: 90vw !important;
    height: 85vh !important;
    max-width: 1200px !important;
    bottom: 5% !important;
    right: 5% !important;
    margin: auto !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 1000 !important;
    border-radius: 2.5rem !important;
}

/* Markdown Content Styling */
.markdown-content {
    line-height: 1.6;
    word-wrap: break-word;
    font-size: 13px;
    color: inherit;
}

.markdown-content p {
    margin-bottom: 0.75rem;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content ul, .markdown-content ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
    list-style-position: outside;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ol {
    list-style-type: decimal;
}

.markdown-content li {
    margin-bottom: 0.4rem;
}

.markdown-content strong {
    font-weight: 800;
    color: #0f172a;
}

.markdown-content code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85em;
    color: #ef4444;
}

.markdown-content pre {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #e2e8f0;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.25rem; }
.markdown-content h3 { font-size: 1.1rem; }

.markdown-content blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 1rem;
    color: #64748b;
    font-style: italic;
    margin: 1rem 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 12px;
}

.markdown-content th, .markdown-content td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    text-align: left;
}

.markdown-content th {
    background-color: #f8fafc;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Specific Fix for Chat Bubbles */
#ai-chat-messages .markdown-content p {
    margin-bottom: 0.5rem;
}

#ai-chat-messages .markdown-content p:last-child {
    margin-bottom: 0;
}
