/* _content/DiSkribe/Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-3h6qydcekp] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-3h6qydcekp] {
    flex: 1;
}

.sidebar[b-3h6qydcekp] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-3h6qydcekp] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-3h6qydcekp]  a, .top-row[b-3h6qydcekp]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-3h6qydcekp]  a:hover, .top-row[b-3h6qydcekp]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-3h6qydcekp]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-3h6qydcekp] {
        justify-content: space-between;
    }

    .top-row[b-3h6qydcekp]  a, .top-row[b-3h6qydcekp]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-3h6qydcekp] {
        flex-direction: row;
    }

    .sidebar[b-3h6qydcekp] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-3h6qydcekp] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-3h6qydcekp]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-3h6qydcekp], article[b-3h6qydcekp] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

#blazor-error-ui[b-3h6qydcekp] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-3h6qydcekp] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* _content/DiSkribe/Components/Pages/Chat.razor.rz.scp.css */
.chat-layout[b-g5gguai6np] {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
    margin: -16px;
}

/* Sidebar */
.chat-sidebar[b-g5gguai6np] {
    width: 260px;
    min-width: 260px;
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header[b-g5gguai6np] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-sessions[b-g5gguai6np] {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.session-item[b-g5gguai6np] {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    gap: 6px;
    transition: background 0.15s;
}

.session-item:hover[b-g5gguai6np] {
    background: rgba(255,255,255,0.06);
}

.session-item.active[b-g5gguai6np] {
    background: rgba(121,134,203,0.2);
}

.session-item.selected[b-g5gguai6np] {
    background: rgba(121,134,203,0.12);
}

.session-check[b-g5gguai6np] {
    margin-right: 4px;
}

.sidebar-selection-bar[b-g5gguai6np] {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(121,134,203,0.06);
}

.session-title[b-g5gguai6np] {
    flex: 1;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-delete[b-g5gguai6np] {
    opacity: 0;
    transition: opacity 0.15s;
}

.session-item:hover .session-delete[b-g5gguai6np] {
    opacity: 1;
}

/* Main chat */
.chat-main[b-g5gguai6np] {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages-container[b-g5gguai6np] {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-empty[b-g5gguai6np] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.6;
    text-align: center;
}

/* Message rows */
.message-row[b-g5gguai6np] {
    display: flex;
    gap: 8px;
    max-width: 100%;
}

.message-row.user[b-g5gguai6np] {
    flex-direction: row-reverse;
}

.message-avatar[b-g5gguai6np] {
    width: 32px;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
}

.message-bubble[b-g5gguai6np] {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    word-break: break-word;
}

.user-bubble[b-g5gguai6np] {
    background: rgba(121,134,203,0.25);
    border-bottom-right-radius: 4px;
}

.assistant-bubble[b-g5gguai6np] {
    background: rgba(255,255,255,0.05);
    border-bottom-left-radius: 4px;
}

.tool-running[b-g5gguai6np] {
    background: rgba(121,134,203,0.1);
    opacity: 0.8;
}

/* Message actions */
.message-actions[b-g5gguai6np] {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.message-bubble:hover .message-actions[b-g5gguai6np] {
    opacity: 1;
}

/* Typing cursor */
.typing-cursor[b-g5gguai6np] {
    display: inline-block;
    animation: blink-b-g5gguai6np 1s step-end infinite;
    color: var(--mud-palette-primary);
    font-weight: bold;
}

@keyframes blink-b-g5gguai6np {
    50% { opacity: 0; }
}

/* Input area */
.chat-input-area[b-g5gguai6np] {
    padding: 8px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.token-bar[b-g5gguai6np] {
    margin-bottom: 6px;
    display: flex;
    justify-content: flex-end;
}

/* MudFileUpload wrapper — block, full width. */
.composer-upload-wrapper[b-g5gguai6np] {
    display: block;
    width: 100%;
}

/* Strip MudBlazor's default dashed-box styling from the dragarea so our
   composer-card provides the visual frame. */
.composer-upload-wrapper[b-g5gguai6np]  .mud-file-upload-dragarea {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    min-height: 0;
}

/* Composer card — unified rounded box */
.composer-card[b-g5gguai6np] {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.composer-card-dragging[b-g5gguai6np] {
    border: 2px dashed var(--mud-palette-primary) !important;
    box-shadow: 0 0 0 4px rgba(121,134,203,0.15);
    background: rgba(121,134,203,0.04);
}

/* Drop the inner textarea outline — composer-card already provides the frame. */
.composer-textarea[b-g5gguai6np]  .mud-input-outlined-border {
    border: none !important;
}
.composer-textarea[b-g5gguai6np]  .mud-input-outlined {
    background: transparent;
}
.composer-textarea[b-g5gguai6np]  .mud-input-slot {
    padding-left: 4px;
    padding-right: 4px;
}

/* Attachment pill — clickable filename + actions */
.attachment-item[b-g5gguai6np] {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 2px 4px;
    background: rgba(255,255,255,0.02);
    transition: background 0.15s, border-color 0.15s;
}

.attachment-item:hover[b-g5gguai6np] {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.22);
}

.attachment-button[b-g5gguai6np] {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: none;
    color: inherit;
    padding: 2px 6px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1.4;
}

.attachment-button:hover[b-g5gguai6np] {
    background: rgba(255,255,255,0.05);
}

.attachment-name[b-g5gguai6np] {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-action[b-g5gguai6np] {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    padding: 2px !important;
}

.attachment-action[b-g5gguai6np]  .mud-icon-root {
    font-size: 1rem !important;
}

/* Preview dialog body styling */
.preview-body[b-g5gguai6np] {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 12px;
}

/* Markdown body */
.md-body[b-g5gguai6np] {
    font-size: 0.9rem;
    line-height: 1.6;
}

.md-body p[b-g5gguai6np] { margin: 0 0 0.6em; }
.md-body p:last-child[b-g5gguai6np] { margin-bottom: 0; }
.md-body pre[b-g5gguai6np] {
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85rem;
    position: relative;
}
.md-body code[b-g5gguai6np] {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
}
.md-body :not(pre) > code[b-g5gguai6np] {
    background: rgba(255,255,255,0.1);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Copy button from chat-utils.js */
.code-copy-btn[b-g5gguai6np] {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    padding: 3px 8px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

pre:hover .code-copy-btn[b-g5gguai6np] {
    opacity: 1;
}
