.ez-rich-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  position: relative;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ez-rich-text:focus-within {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

/* Keep the sync textarea out of the layout; app-crud form rules override .visually-hidden width. */
.ez-rich-text .ez-rich-text__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.ez-rich-text__editor {
  min-height: 10rem;
  background: #fff;
}

.ez-rich-text .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #f1f5f9;
}

/* Quill sets height:100% on the container — without a fixed parent height the edit area collapses. */
.ez-rich-text .ql-container.ql-snow {
  border: none;
  border-radius: 0;
  height: auto !important;
  min-height: 10rem;
  font-family: var(--app-font, "Segoe UI", system-ui, sans-serif);
  font-size: 0.9375rem;
  background: #fff;
}

.ez-rich-text .ql-editor {
  min-height: 10rem;
  cursor: text;
  background: #fff;
}

.ez-rich-text .ql-editor.ql-blank::before {
  color: #94a3b8;
  font-style: normal;
}

.ez-rich-text--ready .ql-container.ql-snow {
  border-top: 1px solid #e2e8f0;
}

.ez-rich-html p {
  margin: 0 0 0.5rem;
}

.ez-rich-html ul,
.ez-rich-html ol {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
}

.ez-rich-html a {
  color: var(--kd-blue, #1e40af);
}
