/*
    All of the app's own styles. They live here rather than in <style> blocks or style="" attributes in the views,
    because the Content Security Policy (see Startup) blocks inline styles without the page's nonce - and content
    loaded via htmx is rendered with the nonce of its own request, not the page's, so it couldn't carry one anyway.
*/

.text-muted {
    color: var(--agk-color-muted);
}

a.plain-link {
    text-decoration: none;
}

/* AI assistant (_AiAssistantConversation, _AiAssistantFeedback, _AiAssistantSources) */

.ai-chat-input {
    margin-top: 1.5rem;
}

/* the suggestions are added by script, without the whitespace that spaces buttons written into the markup */
#ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

#ai-feedback {
    margin-top: 1rem;
}

.ai-feedback-send {
    margin-top: .5rem;
}

.ai-sources {
    max-width: 75%;
    margin-top: 1rem;
    font-size: 0.9em;

    summary {
        cursor: pointer;
        color: var(--agk-color-muted);
    }

    ol {
        margin: 0.5rem 0 0;
        padding-left: 1.5rem;
    }

    li {
        margin-bottom: 0.6rem;
    }
}

.ai-source-header p {
    margin: 0;
}

.ai-source-meta {
    color: var(--agk-color-muted);
    font-size: 0.9em;
}

.ai-source-snippet {
    margin-top: 0.15rem;
}

/* AI assistant log (AiSearchLog/Conversation) */

/* a bubble's info is plain text, so its lines are kept apart by line breaks in the text itself */
.ai-log-conversation .chat > small {
    white-space: pre-line;
}

.ai-log-error {
    white-space: pre-wrap;
    font-size: 0.8em;
}

/* Documents (_DocumentsPartial, Document) */

.document-snippets {
    border-left: 3px solid var(--agk-color-muted);
    padding-left: 1rem;
    margin-top: .5rem;
}

.document-flag {
    height: 1rem;
    width: 1rem;
    display: inline-block;
    border-radius: 50%;
    border: 1px solid currentColor;
}

.html-shadow-host {
    background-color: white;
    color: black;
    padding: 1rem;
    font-family: sans-serif;
    text-align: justify;
    hyphens: auto;
    animation: none;
}

/* GuiKit sets a display on some elements (eg. buttons), which would otherwise override the hidden attribute (no
   !important needed: GuiKit's styles are in cascade layers, which the app's own CSS always wins over) */
[hidden] {
    display: none;
}

/* the alignment of Markdown table columns (see MarkdownRenderer) */
.text-align-left {
    text-align: left;
}

.text-align-center {
    text-align: center;
}

.text-align-right {
    text-align: right;
}
