[data-dp-text-accents] :is(span.dp-marker, span.dp-circle, span.dp-underline) {
  position: relative;
  isolation: isolate;
}

/* Move the phrase together and allow it to wrap inside its own box. */
[data-dp-text-accents] :is(span.dp-circle, span.dp-keep-together) {
  display: inline-block;
  box-sizing: border-box;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}

[data-dp-text-accents] span.dp-marker::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: var(--dp-marker-z, -1);
  inset-inline-start: 50%;
  top: calc(50% + var(--dp-marker-offset));
  width: calc(100% * var(--dp-marker-scale, 1));
  height: calc(var(--dp-marker-height) * var(--dp-marker-scale, 1));
  translate: -50% -50%;
  rotate: var(--dp-marker-rotation, 0deg);
  background: var(--dp-marker) center / 100% 100% no-repeat;
}

[data-dp-text-accents] span.dp-circle::after,
[data-dp-text-accents] span.dp-underline:not(.dp-circle)::after,
[data-dp-text-accents] span.dp-circle.dp-underline:not(.dp-marker)::before {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 50%;
  translate: -50% -50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

[data-dp-text-accents] span.dp-circle::after {
  top: 50%;
  width: calc(100% * var(--dp-circle-scale, 1) + 2 * var(--dp-circle-padding));
  height: calc(100% * var(--dp-circle-scale, 1) + 2 * var(--dp-circle-padding));
  background-image: var(--dp-circle);
  rotate: var(--dp-circle-rotation, 0deg);
  z-index: var(--dp-circle-z, 1);
}

[data-dp-text-accents] span.dp-underline:not(.dp-circle)::after,
[data-dp-text-accents] span.dp-circle.dp-underline:not(.dp-marker)::before {
  top: calc(100% - var(--dp-underline-offset));
  width: calc(100% * var(--dp-underline-scale, 1));
  height: calc(var(--dp-underline-size) * var(--dp-underline-scale, 1));
  background-image: var(--dp-underline);
  rotate: var(--dp-underline-rotation, 0deg);
  z-index: var(--dp-underline-z, 1);
}

/* Stacked decorations use the front layer for both strokes when the marker occupies the rear layer. */
[data-dp-text-accents] span.dp-circle.dp-underline.dp-marker::after {
  background-image: var(--dp-circle), var(--dp-underline);
  background-position: center, center calc(50% + .5em - var(--dp-underline-offset));
  background-size: 100% 100%, calc(100% * var(--dp-underline-scale, 1) / var(--dp-circle-scale, 1)) calc(var(--dp-underline-size) * var(--dp-underline-scale, 1));
}

[data-dp-text-accents] :is(span.dp-outline, span.dp-hollow) {
  -webkit-text-stroke: var(--dp-outline-width) var(--dp-outline-color);
}

@media (forced-colors: none) {
  [data-dp-text-accents] span.dp-hollow:not(.dp-gradient),
  [data-dp-text-accents][data-dp-outline-transparent] span.dp-outline {
    -webkit-text-fill-color: transparent;
  }

  [data-dp-text-accents][data-dp-gradient-active="move"] {
    background-image: none !important;
    background-color: transparent !important;
  }

  [data-dp-text-accents][data-dp-gradient-active] span.dp-gradient {
    background-image: var(--dp-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    -webkit-text-fill-color: transparent;
  }
}

@media (forced-colors: active) {
  [data-dp-text-accents] :is(span.dp-marker, span.dp-circle, span.dp-underline)::before,
  [data-dp-text-accents] :is(span.dp-circle, span.dp-underline)::after { display: none; }
  [data-dp-text-accents] :is(span.dp-outline, span.dp-hollow) {
    -webkit-text-stroke-width: 0;
  }

  [data-dp-text-accents] span.dp-underline {
    text-decoration: underline;
  }
}

.et_vb_toolbar .dp-accent-toolbar-button {
  font-size: 16px;
  line-height: 1;
}

.et_vb_toolbar .dp-inline-star {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
}

[data-dp-inline-toolbar-docked] .et_vb_toolbar .et-vb-module-options:not(.et-vb-module-options--wireframe),
[data-dp-inline-toolbar-docked] .et_vb_toolbar .inline-rich-text-editor-toolbar-text-settings-container,
[data-dp-inline-toolbar-docked] .et_vb_toolbar .inline-rich-text-editor-toolbar-color-controls-container {
  position: fixed !important;
  top: 8px !important;
  left: 50% !important;
  right: auto !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  translate: -50% 0;
  z-index: 999999;
}

.dp-accent-toolbar-menu .dp-inline-dock-toggle {
  margin-top: 4px;
  border-top: 1px solid rgb(255 255 255 / 18%);
  border-radius: 0;
}

.et_vb_toolbar .dp-accent-toolbar-menu {
  position: fixed;
  z-index: 2147483647;
  inset: auto;
  margin: 0;
  display: grid;
  box-sizing: border-box;
  min-width: min(180px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 0;
  border-radius: 5px;
  background: #202a36;
  color: #fff;
  box-shadow: 0 4px 18px #0004;
}

.et_vb_toolbar:has(.dp-accent-toolbar-menu:not([hidden])) { z-index: 2147483647 !important; }

.et_vb_toolbar .dp-accent-toolbar-menu [hidden],
.et_vb_toolbar .dp-accent-toolbar-menu[hidden] {
  display: none;
}

.et_vb_toolbar .dp-accent-toolbar-menu button,
.et_vb_toolbar .dp-accent-toolbar-menu small {
  padding: 7px 10px;
  color: inherit;
  background: transparent;
  font: 13px/1.4 system-ui, sans-serif;
  text-align: left;
}

.et_vb_toolbar .dp-accent-toolbar-menu button {
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}

.et_vb_toolbar .dp-accent-toolbar-menu button:enabled:is(:hover,:focus-visible) {
  background: #37475c;
}

.et_vb_toolbar .dp-accent-toolbar-menu button:disabled {
  cursor: default;
  opacity: .5;
}


span[data-dp-phrase] {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.et_vb_toolbar .dp-accent-toolbar-menu > div:first-child {
  display: grid;
}

.et_vb_toolbar .dp-accent-toolbar-menu > div[hidden] {
  display: none;
}

.et_vb_toolbar .dp-phrase-settings {
  width: min(280px, 80vw);
  padding: 8px;
  font: 13px/1.45 system-ui, sans-serif;
}

.dp-phrase-settings details {
  margin: 0 0 12px;
  padding: 4px 0 9px;
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / 16%);
}

.dp-phrase-settings summary {
  padding: 5px 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dp-phrase-settings details > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dp-phrase-settings label {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px;
}

.dp-phrase-settings .dp-phrase-control {
  box-sizing: border-box;
  width: 100px;
  min-height: 28px;
  padding: 2px 6px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 4px;
  background: rgb(255 255 255 / 8%);
  color: inherit;
  font: inherit;
  color-scheme: dark;
}

.dp-phrase-settings input[type="color"] { width: 42px; }
.dp-phrase-settings-actions {
  position: sticky;
  bottom: -6px;
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding-top: 5px;
  background: #202a36;
}

.dp-phrase-settings input[type="number"] {
  appearance: textfield;
  width: 64px;
}
.dp-phrase-settings input::-webkit-inner-spin-button,
.dp-phrase-settings input::-webkit-outer-spin-button { appearance: none; }
.dp-phrase-steppers { display: inline-flex; gap: 1px; }
.et_vb_toolbar .dp-accent-toolbar-menu .dp-phrase-steppers button {
  padding: 4px 5px;
  text-align: center;
}

/* Divi renders the inline toolbar in a body-level portal. Put that portal,
   rather than only its child controls, above the site's sticky header. */
[data-dp-inline-toolbar-docked] .et_vb_toolbar {
  position: fixed !important;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  z-index: 2147483647 !important;
  pointer-events: none;
}

[data-dp-inline-toolbar-docked] .et_vb_toolbar > *,
[data-dp-inline-toolbar-docked] .et_vb_toolbar .dp-accent-toolbar-menu {
  pointer-events: auto;
}

.dp-phrase-custom-css {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}

.dp-phrase-custom-css .dp-phrase-control {
  width: 100%;
  box-sizing: border-box;
  font-family: monospace;
  resize: vertical;
}

span[data-dp-phrase-animation]:is([data-dp-phrase-animation*='"preset":"fade"'],
  [data-dp-phrase-animation*='"preset":"bounce"'], [data-dp-phrase-animation*='"preset":"tada"']) {
  display: inline-block;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}

.dp-edit-accent-phrase {
  position: fixed;
  z-index: 2147483000;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #7737d4;
  color: #fff;
  font: 18px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px #15244642;
}

.dp-edit-accent-phrase[hidden] {
  display: none;
}

.dp-edit-accent-phrase svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.et_vb_toolbar button.dp-inline-drag {
  cursor: grab;
  touch-action: none;
  align-self: stretch;
  min-width: 25px;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  color: inherit;
}

.et_vb_toolbar button.dp-inline-drag:active {
  cursor: grabbing;
}

.dp-accent-toolbar-menu > .dp-inline-drag {
  position: sticky;
  top: -6px;
  z-index: 1;
  background: #202a36 !important;
  text-align: center !important;
  border-bottom: 1px solid rgb(255 255 255 / 16%) !important;
}
