/* sourc-e AI — Custom Styles (Chainlit 2.9.6) */

/* =============================================================================
   Watermark — Hide Chainlit's default disclaimer
   ============================================================================= */

.watermark {
    display: none !important;
}

/* =============================================================================
   Sidebar — Logo at bottom
   ============================================================================= */

/* Sidebar container — flex column to push logo to bottom */
.bg-sidebar {
    display: flex !important;
    flex-direction: column !important;
}

/* Logo at the bottom of the sidebar */
.bg-sidebar::after {
    content: '';
    display: block;
    width: 100px;
    height: 35px;
    margin: auto auto 14px;
    background: url('/public/logo_dark.png') no-repeat center center;
    background-size: contain;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.bg-sidebar:hover::after {
    opacity: 0.75;
}

/* Sidebar text — compact for info panels */
.cl-sidebar .cl-text {
    font-size: 13px;
    line-height: 1.5;
}

/* =============================================================================
   Chat Messages — Clean typography
   ============================================================================= */

/* Chat font — slightly larger than 13px default, modern spacing */
.cl-message-content {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
}

/* Reduce vertical spacing between messages */
.cl-message {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Links — sourc-e red on hover */
.cl-message-content a:hover {
    color: hsl(0 84% 60%);
}

/* =============================================================================
   Markdown Tables — Clean header style
   ============================================================================= */

.cl-message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.75em 0;
    font-size: 13px;
}

.cl-message-content table th,
.cl-message-content table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
}

.cl-message-content table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
    background: transparent;
}

/* Subtle row hover */
.cl-message-content table tr:hover td {
    background: hsl(var(--muted) / 0.15);
}

/* =============================================================================
   Code Blocks — Accent border
   ============================================================================= */

.cl-message-content pre {
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    border-left: 3px solid hsl(0 84% 60% / 0.3);
}

/* =============================================================================
   Step Indicators + Input Area
   ============================================================================= */

.step {
    font-size: 12px;
}

.cl-chat-input textarea {
    font-size: 13.5px !important;
}

/* =============================================================================
   Scrollbar — Thin (WebKit only, safe)
   ============================================================================= */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.35);
}

/* =============================================================================
   Responsive — Mobile (< 640px)
   ============================================================================= */

@media (max-width: 639px) {
  .cl-message-content { font-size: 14px !important; line-height: 1.7 !important; }
  .cl-message-content table { display: block; overflow-x: auto; }
  .cl-chat-input textarea { font-size: 16px !important; }
  .bg-sidebar::after { width: 70px; height: 25px; }
}
