/* The original bubble editor owns the shell, subject, lane, categories and actions. */
.rich-test-card [hidden], #edit-thought-form [hidden], #new-thought-form [hidden] { display: none !important; }
.rich-test-card h3 { padding-right: 2rem; }
.rich-test-card form { display: grid; gap: .75rem; }
.rich-test-card input { min-width: 0; width: 100%; }
.rich-test-entry { display: grid; text-align: left; width: 100%; gap: .35rem; border: 1px solid var(--line); border-radius: .45rem; background: #fff; padding: .75rem; color: var(--ink); font: inherit; cursor: pointer; }
.rich-test-entry span { color: var(--muted); font-size: .86rem; }
.rich-description-field { display: grid; gap: .3rem; min-width: 0; }
.rich-description-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 600; font-size: .92rem; }
.rich-description-format { display: inline-flex; align-items: center; flex-shrink: 0; }
.rich-description-format > span { display: none; }
.modal-card .rich-description-format select { min-width: 0; border: 1px solid #c7c2b8; border-radius: .3rem; padding: .25rem .4rem; font-size: .8rem; font-weight: 500; background: #fffdf6; color: var(--ink); cursor: pointer; }
.modal-card .rich-description-format select:hover { border-color: var(--muted); }
.modal-card .rich-description-format select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rich-description-box { position: relative; display: flex; flex-direction: column; height: 5rem; min-height: 5rem; overflow: hidden; resize: vertical; border: 1px solid #252525; border-radius: .45rem; background: #fff; }
.rich-test-blocks { flex: 1; min-height: 0; overflow: auto; padding: .45rem .6rem; }
.rich-description-box .rich-test-add { flex-shrink: 0; align-self: flex-start; padding: .1rem .6rem .25rem; }
.rich-description-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rich-test-blocks:has(> textarea) { display: flex; overflow: hidden; }
.rich-test-row { display: flex; align-items: flex-start; gap: .5rem; min-width: 0; }
.rich-test-row input[type=checkbox] { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.modal-card .rich-test-blocks textarea { min-width: 0; width: 100%; border: 0; background: transparent; border-radius: 0; padding: 2px 0; min-height: 100%; font-weight: 600; }
.modal-card .rich-test-blocks textarea { resize: none; }
.modal-card .rich-test-blocks textarea:focus { outline: none; box-shadow: none; }
.modal-card .rich-test-blocks > textarea { flex: 1; height: 100%; min-height: 0; overflow: auto; }
.modal-card .rich-test-row textarea { min-height: 28px; resize: none; flex: 1; line-height: 1.3; overflow: hidden; }
.modal-card .rich-test-row.is-checked textarea { text-decoration: line-through; color: var(--muted); }
.rich-test-marker { min-width: 18px; text-align: right; padding-top: 2px; font-weight: 600; }
.rich-test-remove { border: 0; background: transparent; color: var(--muted); width: 24px; height: 28px; font-size: 18px; opacity: 0; cursor: pointer; }
.rich-test-row:hover .rich-test-remove, .rich-test-row:focus-within .rich-test-remove { opacity: 1; }
.rich-test-add { justify-self: start; border: 0; background: transparent; color: var(--muted); padding: .1rem 0; font: inherit; font-size: .8rem; cursor: pointer; }
.rich-description-field [data-status] { font-size: .86rem; overflow-wrap: anywhere; }
.rich-description-field [data-status]:empty, .rich-test-card [data-gate-status]:empty { display: none; }
.rich-description-field .rich-test-error { color: #a63226; }
.modal.has-rich-description { max-height: 94dvh; overflow: auto; }
.modal.rich-description-pending { visibility: hidden; }
.modal.rich-description-pending::backdrop { visibility: hidden; }
@media (hover: none) { .rich-test-remove { opacity: 1; } }

.rich-test-card [data-menu] { display: grid; gap: .75rem; }
.rich-test-card .rich-default-option { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.rich-test-card .rich-default-option input { width: 18px; height: 18px; margin: .1rem 0 0; flex-shrink: 0; accent-color: var(--accent); }
.rich-test-card .rich-default-help { font-size: .8rem; line-height: 1.4; }

.rich-completion-settings { display: grid; gap: .5rem; padding-top: .75rem; border-top: 1px solid #ded9cf; }
.rich-completion-settings select { background: #fffdf6; color: var(--ink); }
.rich-preview-button { justify-self: start; border: 1px solid #c7c2b8; border-radius: .3rem; padding: .35rem .6rem; background: #fffdf6; font: inherit; font-size: .8rem; cursor: pointer; }
.rich-preview-button:disabled { opacity: .6; cursor: default; }
.rich-preview-bubble { justify-self: center; margin: .5rem 0; border: 2px solid var(--accent); border-radius: 999px; padding: .7rem 1.2rem; background: #fffef9; color: var(--ink); font-weight: 600; }
