.saq-rich-editor-fallback {
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 10px 12px;
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  background: #fff;
  color: #111827;
}

textarea.saq-rte-source-hidden {
  display: none !important;
}

.saq-rte-fallback {
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.saq-rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid #d8dee8;
  padding: 8px;
  background: #f7f9fb;
}

.saq-rte-button,
.saq-rte-select,
.saq-rte-color {
  box-sizing: border-box;
  height: 32px;
  border: 1px solid #b9c2cf;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  font: 600 13px/1.2 Arial, Helvetica, sans-serif;
}

.saq-rte-button {
  min-width: 34px;
  padding: 0 9px;
  cursor: pointer;
}

.saq-rte-button:hover,
.saq-rte-select:hover,
.saq-rte-color:hover {
  border-color: #65758b;
  background: #eef4ff;
}

.saq-rte-button:focus,
.saq-rte-select:focus,
.saq-rte-color:focus,
.saq-rte-editor:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.saq-rte-select {
  min-width: 92px;
  padding: 0 6px;
}

.saq-rte-color {
  width: 36px;
  padding: 3px;
}

.saq-rte-editor {
  box-sizing: border-box;
  width: 100%;
  min-height: 260px;
  padding: 14px 16px;
  background: #fff;
  color: #111827;
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  overflow: auto;
}

.saq-rte-editor[hidden] {
  display: none;
}

.saq-rte-editor:empty::before {
  color: #64748b;
  content: "Start typing...";
}

.saq-rte-editor ul,
.saq-rte-editor ol {
  margin: 0 0 1em 1.5em;
  padding: 0;
}

.saq-rte-editor p {
  margin: 0 0 1em;
}

.saq-rte-editor blockquote {
  border-left: 3px solid #94a3b8;
  margin: 0 0 1em;
  padding-left: 12px;
  color: #374151;
}

textarea.rich-answer.saq-rte-source-textarea {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-top: 1px solid #d8dee8;
  border-radius: 0;
  padding: 14px 16px;
  font: 14px/1.5 Consolas, Monaco, monospace;
}

.tox-tinymce {
  border-radius: 4px;
}

.saq-question-block table,
.mce-content-body table,
.saq-rte-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1em;
}

.saq-question-block td,
.saq-question-block th,
.mce-content-body td,
.mce-content-body th,
.saq-rte-editor td,
.saq-rte-editor th {
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  vertical-align: top;
}

.saq-question-block th,
.mce-content-body th,
.saq-rte-editor th {
  background: #f8fafc;
  font-weight: 700;
}

@media (max-width: 640px) {
  .saq-rte-toolbar {
    gap: 5px;
    padding: 6px;
  }

  .saq-rte-button {
    min-width: 32px;
    padding: 0 7px;
  }

  .saq-rte-select {
    min-width: 82px;
  }
}
