[class^="wz-richtext-highlight-"],
[class*=" wz-richtext-highlight-"] {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: 0.25em;
  padding: 0.05em 0.2em;
}

.Draftail-Editor .public-DraftEditor-content ::selection,
.Draftail-Editor .public-DraftEditor-content *::selection {
  background-color: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.Draftail-Editor .public-DraftEditor-content ::-moz-selection,
.Draftail-Editor .public-DraftEditor-content *::-moz-selection {
  background-color: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.Draftail-block--text-center {
  text-align: center;
}

.wz-richtext-palette {
  position: relative;
  display: flex;
  align-items: center;
  margin-inline-end: 0.625rem;
}

.wz-richtext-palette__source {
  display: none !important;
}

.Draftail-ToolbarButton.wz-richtext-palette__source,
.Draftail-FloatingToolbar .Draftail-ToolbarButton.wz-richtext-palette__source {
  display: none !important;
}

.wz-richtext-palette__toggle {
  gap: 0.3rem;
  min-width: 2.5rem;
  padding-inline: 0.45rem;
  box-shadow: inset 0 -0.18rem 0 var(--wz-palette-active-swatch, transparent);
}

.wz-richtext-palette__toggle--active {
  background-color: var(--w-color-surface-header, #eef2f7);
  border-color: var(--w-color-border-furniture, #cbd5e1);
}

.wz-richtext-palette__toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.wz-richtext-palette__toggle-label--highlight {
  background: linear-gradient(
    to top,
    #ffe58f 0 48%,
    transparent 48% 100%
  );
  border-radius: 0.15rem;
  padding-inline: 0.1rem;
}

.wz-richtext-palette__caret {
  width: 0;
  height: 0;
  border-left: 0.25rem solid transparent;
  border-right: 0.25rem solid transparent;
  border-top: 0.3rem solid currentColor;
  opacity: 0.7;
}

.wz-richtext-palette__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline-start: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(var(--wz-palette-columns, 6), minmax(0, 1fr));
  gap: 0.45rem;
  min-width: 14rem;
  max-width: min(24rem, calc(100vw - 2rem));
  max-height: min(20rem, calc(100vh - 8rem));
  overflow-y: auto;
  padding: 0.55rem;
  background: var(--w-color-surface-page, #fff);
  border: 1px solid var(--w-color-border-field-default, #cbd5e1);
  border-radius: 0.55rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.wz-richtext-palette__menu[hidden] {
  display: none;
}

.wz-richtext-palette__swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 0.45rem;
  background: var(--wz-swatch, #fff);
  color: var(--wz-swatch-ink, #fff);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.wz-richtext-palette__swatch::before {
  content: "A";
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.wz-richtext-palette__swatch--clear {
  background:
    linear-gradient(135deg, transparent 44%, #ef4444 44%, #ef4444 56%, transparent 56%),
    #ffffff;
  color: #334155;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.wz-richtext-palette__swatch--clear::before {
  content: "X";
  font-size: 0.72rem;
  font-weight: 800;
}

.wz-richtext-palette__menu::-webkit-scrollbar {
  width: 0.65rem;
}

.wz-richtext-palette__menu::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border: 0.15rem solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.wz-richtext-palette__swatch[data-swatch-kind="highlight"]::before {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.6) 0 48%,
    transparent 48% 100%
  );
  border-radius: 0.15rem;
  padding-inline: 0.08rem;
}

.wz-richtext-palette__swatch:hover,
.wz-richtext-palette__swatch:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.35);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.wz-richtext-palette__swatch--active {
  border-color: var(--w-color-focus, #0ea5e9);
  box-shadow: 0 0 0 2px var(--w-color-focus, #0ea5e9);
}
