/* Keep the existing dialog, file controls and comment form styling. */
.workspace-bounded-dialog {
    box-sizing: border-box;
    width: min(1140px, 100%) !important;
    height: auto;
    max-height: calc(100dvh - 48px) !important;
    overflow-y: auto !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    white-space: normal;
    --workspace-list-viewport: max(100px, calc(100dvh - 340px));
}

.workspace-bounded-dialog .workspace-header {
    flex-shrink: 0;
    max-height: 25vh;
    overflow-y: auto;
}

.operator-workspace .workspace-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    white-space: normal;
    flex: none;
    min-height: 0;
}

.operator-workspace .workspace-files,
.operator-workspace .workspace-chat {
    min-width: 0;
    overflow-wrap: anywhere;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.operator-workspace .workspace-chat {
    padding-left: 20px;
    border-left: 1px solid #e6eaf0;
}

.workspace-bounded-dialog .workspace-chat-messages,
.workspace-bounded-dialog .workspace-file-history {
    flex: none;
    min-height: 0;
    max-height: min(var(--workspace-five-height, 460px), var(--workspace-list-viewport));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #a8b3c2 #eef2f7;
}

.workspace-bounded-dialog .workspace-attachment-upload,
.workspace-bounded-dialog .workspace-comment-form {
    flex-shrink: 0;
}

.workspace-bounded-dialog textarea {
    max-height: 22vh;
}

.client-workspace-dialog {
    --workspace-list-viewport: max(90px, calc((100dvh - 500px) / 2));
}

.client-workspace-chat {
    display: flex;
    flex-direction: column;
    flex: none;
    min-height: 0;
}

.workspace-comment {
    border-bottom: 1px solid #e6eaf0;
    padding: 8px 0;
}

.workspace-history-entry {
    display: flow-root;
}

.workspace-comment:last-child {
    border-bottom: 0;
}

.workspace-comment-context,
.workspace-comment-text {
    margin-top: 4px;
}

.workspace-comment-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-receipt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 7px;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.comment-read-label { color: #667085; }
.comment-read-label.workspace-new-comment { color: #624800; }
.comment-read-label.comment-read-confirmed { color: #217344; font-weight: 600; }

html[data-repro-theme="dark"] .comment-read-label { color: #b4bdcb; }
html[data-repro-theme="dark"] .comment-read-label.workspace-new-comment { color: #ffe29a; }
html[data-repro-theme="dark"] .comment-read-label.comment-read-confirmed { color: #b1edc7; }
html[data-repro-theme="dark"] .comment-read-error { color: #ffbfc3; }
html[data-repro-theme="dark"] .workspace-file-history,
html[data-repro-theme="dark"] .workspace-chat-messages {
    background: var(--repro-soft) !important;
    color: var(--repro-text) !important;
    border-color: var(--repro-border) !important;
    scrollbar-color: #647181 #20262e;
}

@media (max-width: 900px) {
    .operator-workspace .workspace-bounded-dialog {
        --workspace-list-viewport: max(90px, calc((100dvh - 500px) / 2));
    }
    .operator-workspace .workspace-columns {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 14px;
    }

    .operator-workspace .workspace-chat {
        padding-left: 0;
        padding-top: 14px;
        border-left: 0;
        border-top: 1px solid #e6eaf0;
    }
}

