/* "Soạn văn bản", chat page only (đợt 5). The dialog shell is .rs.rs-drafting (chat-tools.js); the page,
   the side pane and the result come from draft-sheet.css, which scopes a few rules under the preview's
   .ds dialog: they are repeated here under .rs-drafting. Colours come from the design tokens. */
.fit-tools-back .rs-drafting .rs-content { overflow: hidden; }
.rs-drafting .rs-form { min-height: 0; }
.rs-drafting .rs-rubric li:nth-child(even) .rs-n { background: var(--primary); }
.rs-drafting .ls-h:focus, .rs-drafting .rs-loading:focus { outline: none; }

/* Empty alert lines take no room in the pinned footer. */
.rs-drafting .ds-stick .rs-error:empty { display: none; }
.rs-drafting .ds-stick .rs-error { flex: none; }
.rs-drafting .ds-dlb:disabled { cursor: not-allowed; }
.rs-drafting .ds-dlb[aria-busy="true"] { cursor: progress; }

/* States the design has no picture for, built from its pieces. */
.rs-drafting .dsx-note { padding: 9px 12px; border: 1.5px solid var(--warning-600); border-radius: var(--radius-md); background: var(--warning-100); color: var(--text); font-size: 13px; line-height: 19px; font-weight: 500; }
.rs-drafting .ds-controls > .rs-hint { margin-top: 0; }
.rs-drafting .ds-right .dsx-fail { flex: none; margin-top: 14px; }
.rs-drafting .ds-res > .rs-hint { margin-top: 0; }
.rs-drafting .dsx-fail-box { display: grid; justify-items: start; gap: 8px; margin: 24px; padding: 16px 18px; border: 2px solid var(--v-ink); border-radius: var(--radius-md); background: var(--tdtu-red-100); box-shadow: 3px 3px 0 var(--v-ink); }
.rs-drafting .dsx-fail-box .rs-muted { color: var(--text); }
.rs-drafting .rs-loading .rs-hint { margin-top: 0; }

/* Long server words (type names, file names, lint messages) wrap inside their boxes. */
.rs-drafting .rs-level span, .rs-drafting .ds-file span, .rs-drafting .ds-cards p, .rs-drafting .ds-is p { overflow-wrap: anywhere; }
.rs-drafting .ds-types .rs-level span { padding: 4px 6px; line-height: 18px; }

/* A long "Vui lòng nhập: …" gets the full width of the narrow side pane; the button moves under it. */
.rs-drafting .ds-side .rs-foot { flex-wrap: wrap; row-gap: 8px; }
.rs-drafting .ds-side .rs-foot .rs-error:not(:empty) { flex-basis: 100%; }
.rs-drafting .ds-side .rs-foot .rs-error:empty { display: none; }
