/* =========================================================================
   Parvenu AI Sales Copilot — v2 (Claude-style, inline)
   Goal: assistant answers (text + tables) render cleanly INLINE in the chat,
   like Claude. No separate right-side preview panel.
   ========================================================================= */

:root {
    --pv-bg: #23242A;          /* app background */
    --pv-surface: #2B2C33;     /* cards / modals */
    --pv-border: #3A3B44;      /* subtle borders */
    --pv-text: #ECECEF;        /* primary text */
    --pv-muted: #A8A9B4;       /* secondary text */
    --pv-accent: #1F3BFF;      /* Parvenu indigo */
    --pv-accent-soft: #19B6C9; /* teal accent */
    --pv-th-bg: #303138;       /* table header background */
    --pv-row-alt: #26272E;     /* zebra row */
}

/* Global background */
body,
#root,
.clApp,
.MuiSheet-root {
    background-color: var(--pv-bg) !important;
}

/* ------------------------------------------------------------------ Tables */
/* Render Markdown tables inline, compact and readable — Claude-like. */
.markdown-body table,
.message-content table,
[class*="markdown"] table {
    width: 100%;
    margin: 0.75rem 0 1rem 0;
    border-collapse: collapse;
    border: 1px solid var(--pv-border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
    display: table;              /* keep it inline in the message, not a widget */
}

.markdown-body thead th,
.message-content thead th,
[class*="markdown"] thead th {
    background-color: var(--pv-th-bg) !important;
    color: var(--pv-text) !important;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.markdown-body th,
.markdown-body td,
.message-content th,
.message-content td,
[class*="markdown"] th,
[class*="markdown"] td {
    border: 1px solid var(--pv-border) !important;
    padding: 8px 12px !important;
    vertical-align: top;
    color: var(--pv-text);
}

/* Zebra striping for scanability */
.markdown-body tbody tr:nth-child(even),
.message-content tbody tr:nth-child(even),
[class*="markdown"] tbody tr:nth-child(even) {
    background-color: var(--pv-row-alt);
}

/* Let wide tables scroll horizontally instead of breaking the layout */
.markdown-body,
.message-content {
    overflow-x: auto;
}

/* Links inside answers */
.markdown-body a,
.message-content a {
    color: var(--pv-accent-soft) !important;
    text-decoration: none;
}
.markdown-body a:hover,
.message-content a:hover {
    text-decoration: underline;
}

/* Bullet points visible */
.markdown-body ul,
.message-content ul {
    padding-left: 20px;
    list-style-type: disc !important;
}

/* Inline code / code blocks */
.markdown-body code,
.message-content code {
    background-color: #1c1d22 !important;
    border: 1px solid var(--pv-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.85em;
}

/* --------------------------------------------------------------- Branding */
/* Hide 'Built with Chainlit' footer */
a[href="https://github.com/Chainlit/chainlit"] {
    display: none !important;
}

/* -------------------------------------------------------- Modal contrast */
.MuiDialog-paper {
    background-color: var(--pv-surface) !important;
    color: var(--pv-text) !important;
}
.MuiDialogTitle-root { color: var(--pv-text) !important; }
.MuiDialogContent-root { color: var(--pv-text) !important; }
.MuiDialogContentText-root { color: var(--pv-muted) !important; }
