/* Adapted from the bundled wireframe library wysiwyg.css to the r013 token names */
.wf-wysiwyg {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.wf-wysiwyg:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wf-wysiwyg__toolbar {
  align-items: center;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 42px;
  padding: 4px 8px;
}

.wf-wysiwyg__toolbar button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  height: 32px;
  padding: 0;
  place-items: center;
  width: 32px;
}

.wf-wysiwyg__toolbar button:hover,
.wf-wysiwyg__toolbar button[aria-pressed="true"] {
  background: var(--paper-strong);
}

.wf-wysiwyg__toolbar button svg {
  height: 16px;
  width: 16px;
}

.wf-wysiwyg__divider {
  background: var(--line);
  height: 22px;
  margin-inline: 4px;
  width: 1px;
}

.wf-wysiwyg__editor {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  min-height: 180px;
  outline: 0;
  padding: 14px 16px;
}

.wf-wysiwyg__editor > :first-child {
  margin-top: 0;
}

.wf-wysiwyg__editor > :last-child {
  margin-bottom: 0;
}

.wf-wysiwyg__editor p,
.wf-wysiwyg__editor ul,
.wf-wysiwyg__editor ol {
  margin: 0 0 10px;
}

.wf-wysiwyg__editor ul,
.wf-wysiwyg__editor ol {
  padding-left: 22px;
}

.wf-wysiwyg__editor a {
  color: var(--ink);
  text-decoration: underline;
}

.form-field.has-error .wf-wysiwyg {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
