@import '_content/DoDMarrow.Blazor.Components/DoDMarrow.Blazor.Components.86a9cjprbn.bundle.scp.css';

/* _content/DonorAssistant.Application/Components/Pages/Chat.razor.rz.scp.css */
/* === Chat page (scoped) ===
   Selectors targeting elements written directly inside Chat.razor are
   automatically scoped by Blazor. Selectors that target classes applied to
   child MudBlazor component roots (e.g. MudPaper Class="composer-paper")
   must use ::deep because Blazor only stamps the scope attribute onto
   elements rendered in this file. */

.chat-page[b-ptprpsfc1u] {
    width: 100%;
}

.chat-page.welcome[b-ptprpsfc1u] {
    min-height: calc(100vh - 1px);
    min-height: calc(100dvh - 1px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-page.chatting[b-ptprpsfc1u] {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.chat-page.chatting .chat-header[b-ptprpsfc1u] {
    flex: 0 0 auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background-color: var(--mud-palette-background, #fff);
}

.chat-page.chatting .chat-scroll[b-ptprpsfc1u] {
    flex: 1 1 auto;
    overflow-y: auto;
}

.chat-page.chatting .chat-composer-dock[b-ptprpsfc1u] {
    flex: 0 0 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: var(--mud-palette-background, #fff);
}

.chat-icon-lg[b-ptprpsfc1u] {
    /* Welcome-screen logo: large enough to anchor the page but not so large it
       crowds the headline + suggestion grid below. */
    max-height: 140px;
    height: auto;
    object-fit: contain;
    transform: translateY(-10px);
}

.chat-page[b-ptprpsfc1u]  .chat-avatar {
    height: 40px;
    width: 40px;
    flex-shrink: 0;
}

.chat-page[b-ptprpsfc1u]  .message-chat .mud-avatar.chat-avatar {
    /* MudX centers avatars against the whole chat content. For long markdown
       answers, keep the avatar attached to the first/top bubble instead. */
    align-self: start;
}

.chat-page[b-ptprpsfc1u]  .assistant-avatar {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-page[b-ptprpsfc1u]  .chat-avatar img {
    object-fit: contain;
    padding: 4px;
}

.chat-header-logo[b-ptprpsfc1u] {
    /* Chat-mode top header logo: large enough to be readable, sized to fit
       the header bar without dominating it. */
    width: min(48vw, 200px);
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.suggestion-grid[b-ptprpsfc1u] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    width: 100%;
}

.chat-page[b-ptprpsfc1u]  .suggestion-card {
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.chat-page[b-ptprpsfc1u]  .suggestion-card:hover {
    background-color: rgba(25, 118, 210, 0.04);
    border-color: rgba(25, 118, 210, 0.4);
}

.chat-page[b-ptprpsfc1u]  .chat-messages {
    width: 100%;
}

.chat-page[b-ptprpsfc1u]  .message-chat {
    max-width: 85%;
}

.chat-page[b-ptprpsfc1u]  .message-chat .mudx-chat-bubble {
    max-width: 100%;
}

.chat-page[b-ptprpsfc1u]  .user-chat {
    margin-left: auto;
}

.chat-page[b-ptprpsfc1u]  .assistant-chat {
    margin-right: auto;
}

@media (max-width: 600px) {
    .chat-page.chatting .chat-scroll[b-ptprpsfc1u]  .mud-container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .chat-page[b-ptprpsfc1u]  .message-chat {
        width: 100%;
        max-width: 100%;
    }

    /* Trim the chat-mode header and footer on mobile so more vertical space
       is available for the conversation itself. */
    .chat-page.chatting .chat-header[b-ptprpsfc1u]  .mud-container {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .chat-page.chatting .chat-header-logo[b-ptprpsfc1u] {
        width: min(40vw, 160px);
    }

    .chat-page.chatting .chat-composer-dock[b-ptprpsfc1u]  .mud-container {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .chat-page.chatting[b-ptprpsfc1u]  .composer-stack {
        gap: 2px;
    }

    .chat-page.chatting[b-ptprpsfc1u]  .composer-stack .mud-typography-caption {
        font-size: 0.62rem;
        line-height: 1.15;
    }

    /* Shrink the chat-mode composer to a single-line pill on mobile so more
       vertical space is left for the conversation. The welcome-mode composer
       intentionally keeps its taller default height. */
    .chat-page.chatting[b-ptprpsfc1u]  .composer-paper {
        padding: 0 4px !important;
        border-radius: 18px;
    }

    .chat-page.chatting[b-ptprpsfc1u]  .composer-paper .mud-input-slot textarea {
        min-height: 0;
        line-height: 1.25;
        font-size: 0.95rem;
    }

    /* Trim the send button so it doesn't drive the composer pill height. */
    .chat-page.chatting[b-ptprpsfc1u]  .composer-paper .mud-icon-button {
        padding: 4px;
    }

    /* Tighten the welcome page so it fits inside a single mobile viewport
       (no scrolling required to see the disclaimer caption under the
       composer). Reduce paddings, stack spacing, logo size, and the
       suggestion-card padding so the entire pane fits in ~100dvh. */
    .chat-page.welcome[b-ptprpsfc1u]  .welcome-pane {
        padding: 12px 12px 8px !important;
    }

    .chat-page.welcome[b-ptprpsfc1u]  .welcome-pane .mud-stack {
        gap: 12px;
    }

    .chat-page.welcome .chat-icon-lg[b-ptprpsfc1u] {
        width: min(60vw, 220px);
        max-height: 80px;
        transform: none;
    }

    .chat-page.welcome .suggestion-grid[b-ptprpsfc1u] {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chat-page.welcome[b-ptprpsfc1u]  .suggestion-card {
        padding: 10px 12px !important;
    }
}

.assistant-markdown[b-ptprpsfc1u] {
    color: #1f1f1f;
}

.chat-page[b-ptprpsfc1u]  .message-text {
    white-space: pre-wrap;
    text-align: left;
}

.chat-page[b-ptprpsfc1u]  .source-toggle {
    min-width: 0;
    text-transform: none;
}

.chat-page[b-ptprpsfc1u]  .message-sources {
    background-color: rgba(25, 118, 210, 0.04);
    border-color: rgba(25, 118, 210, 0.2);
    border-radius: 6px;
}

.message-source + .message-source[b-ptprpsfc1u] {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 6px;
}

.chat-page[b-ptprpsfc1u]  .message-source-title {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.chat-page[b-ptprpsfc1u]  .message-source-snippet {
    color: var(--mud-palette-text-secondary);
    display: block;
    line-height: 1.35;
    margin-top: 2px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.chat-page[b-ptprpsfc1u]  .message-configuration-profile {
    color: var(--mud-palette-text-secondary);
    display: block;
    margin-top: 8px;
}

.chat-page[b-ptprpsfc1u]  .composer-stack {
    width: 100%;
}

.chat-page[b-ptprpsfc1u]  .composer-paper {
    width: 100%;
    border-radius: 24px;
    /* Show a text-insertion cursor over the entire pill so users can tell the
       whole region is clickable to focus the composer. */
    cursor: text;
}

/* Make the MudTextField stretch to fill the composer pill so clicks anywhere
   inside the paper land on the input element itself, not on inert padding. */
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-control,
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-control-input-container,
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input,
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-slot,
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-slot textarea,
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-slot input {
    width: 100%;
    cursor: text;
}

/* Tighten the default markdown spacing so multi-element responses (headings,
   lists, paragraphs) sit comfortably inside the assistant bubble instead of
   spilling out with browser-default margins and oversized headings. */
.assistant-markdown[b-ptprpsfc1u]  :first-child {
    margin-top: 0;
}

.assistant-markdown[b-ptprpsfc1u]  :last-child {
    margin-bottom: 0;
}

.assistant-markdown[b-ptprpsfc1u]  p,
.assistant-markdown[b-ptprpsfc1u]  ul,
.assistant-markdown[b-ptprpsfc1u]  ol,
.assistant-markdown[b-ptprpsfc1u]  blockquote,
.assistant-markdown[b-ptprpsfc1u]  pre,
.assistant-markdown[b-ptprpsfc1u]  table {
    margin: 0.5em 0;
}

.assistant-markdown[b-ptprpsfc1u]  h1,
.assistant-markdown[b-ptprpsfc1u]  h2,
.assistant-markdown[b-ptprpsfc1u]  h3,
.assistant-markdown[b-ptprpsfc1u]  h4,
.assistant-markdown[b-ptprpsfc1u]  h5,
.assistant-markdown[b-ptprpsfc1u]  h6 {
    margin: 0.9em 0 0.4em;
    line-height: 1.25;
    font-weight: 600;
}

.assistant-markdown[b-ptprpsfc1u]  h1 { font-size: 1.35rem; }
.assistant-markdown[b-ptprpsfc1u]  h2 { font-size: 1.2rem; }
.assistant-markdown[b-ptprpsfc1u]  h3 { font-size: 1.1rem; }
.assistant-markdown[b-ptprpsfc1u]  h4 { font-size: 1rem; }
.assistant-markdown[b-ptprpsfc1u]  h5,
.assistant-markdown[b-ptprpsfc1u]  h6 { font-size: 0.95rem; }

.assistant-markdown[b-ptprpsfc1u]  ul,
.assistant-markdown[b-ptprpsfc1u]  ol {
    padding-left: 1.5em;
}

.assistant-markdown[b-ptprpsfc1u]  li + li {
    margin-top: 0.2em;
}

.assistant-markdown[b-ptprpsfc1u]  blockquote {
    padding: 0.25em 0.75em;
    border-left: 3px solid rgba(0, 0, 0, 0.18);
    color: rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.assistant-markdown[b-ptprpsfc1u]  code {
    background-color: rgba(0, 0, 0, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.9em;
}

.assistant-markdown[b-ptprpsfc1u]  pre {
    background-color: rgba(0, 0, 0, 0.06);
    padding: 0.6em 0.8em;
    border-radius: 6px;
    overflow-x: auto;
}

.assistant-markdown[b-ptprpsfc1u]  pre code {
    background: none;
    padding: 0;
}

/* Suppress the residual underline that MudTextField (Variant.Text) draws even
   when Underline="false" is set, so the composer reads as a single rounded
   pill. */
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-control .mud-input.mud-input-underline::before,
.chat-page[b-ptprpsfc1u]  .composer-paper .mud-input-control .mud-input.mud-input-underline::after {
    display: none;
}
