.emalm-dtext-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 0.45em;
}

.emalm-dtext-tool {
  align-items: center;
  background: var(--emalm-ui-surface-2);
  border: 1px solid var(--emalm-ui-border);
  border-radius: 3px;
  color: var(--emalm-ui-surface-text);
  display: inline-flex;
  font: 700 12px/1 Arial, sans-serif;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 0.45em;
}

.emalm-dtext-tool:hover,
.emalm-dtext-tool:focus {
  background: var(--emalm-ui-surface-1);
  border-color: var(--emalm-ui-border-strong);
}

.emalm-dtext-tool-italic {
  font-style: italic;
}

.emalm-dtext-tool-underline {
  text-decoration: underline;
}

.emalm-dtext-tool-strikethrough {
  text-decoration: line-through;
}

.emalm-dtext-preview-tools {
  margin-top: 0.4em;
}

.emalm-dtext-preview-button {
  background: var(--emalm-ui-warning-bg);
  border: 1px solid var(--emalm-ui-warning-border);
  border-radius: 6px;
  color: var(--emalm-ui-warning-text);
  padding: 0.35em 0.7em;
}

.emalm-dtext-preview {
  background: var(--emalm-ui-surface-1);
  border: 1px solid var(--emalm-ui-border);
  border-radius: 8px;
  box-shadow: var(--emalm-ui-shadow-soft);
  margin-top: 0.45em;
  padding: 0.75em;
}

.emalm-dtext-preview:before {
  color: var(--emalm-ui-text-muted);
  content: "Preview";
  display: block;
  font-size: 0.85em;
  font-weight: 700;
  margin-bottom: 0.35em;
  text-transform: uppercase;
}

.dtext-spoiler-inline {
  background: var(--emalm-ui-footer-bg);
  border-radius: 2px;
  color: transparent;
  padding: 0 0.2em;
}

.dtext-spoiler-inline:hover,
.dtext-spoiler-inline:focus {
  color: var(--emalm-ui-header-text);
}

.dtext-translation {
  border-bottom: 1px dotted currentColor;
}
