.service-rich-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 430px;
  border: 1px solid var(--line, #a8aaa8);
  border-radius: 8px;
  background: #fdfdfd;
  overflow: visible;
  position: relative;
  font-size: 13px;
}
.service-rich-text__canvas { min-width: 0; position: relative; }
.service-rich-text__canvas > .service-rich-text__insert { z-index: 2; }
.service-rich-text__document {
  min-height: 430px;
  height: 100%;
  max-height: 550px;
  overflow-y: auto;
  outline: none;
  padding: 18px;
  border-radius: 8px 0 0 8px;
  font: 14px/1.5 "DM Sans", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
}
.service-rich-text__document:focus-visible { box-shadow: inset 0 0 0 2px var(--focus, #1676a6); }
.service-rich-text__document p, .service-description p { margin: 0; min-height: 1.5em; }
.service-rich-text__document h1, .service-rich-text__document h2, .service-rich-text__document h3,
.service-description h1, .service-description h2, .service-description h3 { margin: 0; }
.service-rich-text__document ul, .service-rich-text__document ol, .service-description ul, .service-description ol { padding-inline-start: 24px; }
.service-rich-text__document li, .service-description li { position: relative; }
.service-rich-text__document a, .service-description a { color: #286286; text-decoration: underline; }
.service-rich-text__document [contenteditable=false] { white-space: normal; }
.service-rich-text__document .ProseMirror-gapcursor { display: none; position: absolute; pointer-events: none; }
.service-rich-text__document .ProseMirror-selectednode { outline: 2px solid #8cf; }
.service-rich-text.is-empty .service-rich-text__document::before { content: attr(data-placeholder); position: absolute; color: #6c706e; pointer-events: none; }
.service-rich-text__inspector { border-left: 1px solid var(--line, #a8aaa8); min-width: 0; padding: 14px 18px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 17px; font-size: 14px; }
.service-rich-text__inspector-top { display: flex; align-items: center; justify-content: space-between; width: 100%; font-size: 20px; line-height: 1.2; }
.service-rich-text button, .service-rich-text input, .service-rich-text select,
.service-rich-text__popup button, .service-rich-text__popup input, .service-rich-text__popup select {
  font: inherit;
  color: var(--ink, #111);
  min-height: 34px;
  border: 1px solid var(--line, #a8aaa8);
  border-radius: 8px;
  background: #fafafa;
  margin: 0;
  padding: 3px 7px;
  box-sizing: border-box;
}
.service-rich-text button, .service-rich-text__popup button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.service-rich-text button:hover, .service-rich-text__popup button:hover { background: var(--blue, #d9eefb); }
.service-rich-text button:focus-visible, .service-rich-text input:focus-visible, .service-rich-text select:focus-visible,
.service-rich-text__popup button:focus-visible, .service-rich-text__popup input:focus-visible, .service-rich-text__popup select:focus-visible { outline: 2px solid var(--focus, #1676a6); outline-offset: 2px; }
.service-rich-text button[aria-pressed=true], .service-rich-text__popup button[aria-pressed=true], .service-rich-text__popup button[aria-selected=true] { background: var(--blue-strong, #d1e9ff); }
.service-rich-text__inspector button[aria-pressed=true] { background: #fafafa; }
.service-rich-text button:disabled, .service-rich-text__popup button:disabled { cursor: not-allowed; color: #777; background: #eee; }
.service-rich-text button img, .service-rich-text__popup button img { width: 20px; height: 20px; display: block; }
.service-rich-text__inspector-top button { width: 32px; height: 32px; padding: 5px; }
.service-rich-text__inspector > .service-rich-text__select { width: 244px; max-width: 100%; }
.service-rich-text__inspector > [data-rich-select-field=block] { width: 122px; }
.service-rich-text__weight-size { display: flex; gap: 8px; width: 244px; max-width: 100%; }
.service-rich-text__select .import-data-select__toggle,
.service-rich-text__weight-size input { height: 34px; min-height: 34px; }
.service-rich-text__weight-size > .service-rich-text__select { width: 55%; min-width: 0; }
.service-rich-text__size { min-width: 0; width: 45%; }
.service-rich-text__size .service-rich-text__select { display: block; width: 100%; }
.service-rich-text__select .service-rich-text__pragtical-select { width: 100%; }
.service-rich-text__select .import-data-select__toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 3px 10px; text-align: left; }
.service-rich-text__select .import-data-select__toggle > span { flex: 1 1 auto; text-align: left; }
.service-rich-text__select .contact-create-multiselect__caret { width: 10px; height: 7px; }
.service-rich-text__select .import-data-select__menu { min-width: 100%; max-height: 190px; font-size: 14px; }
.service-rich-text__select .contact-create-single-select__menu [role="option"] { justify-content: space-between; min-height: 30px; padding: 5px 8px; font-size: 14px; text-align: left; }
.service-rich-text__size .import-data-select__toggle { background: #fafafa; }
.service-rich-text__setting > .service-rich-text__select { width: 145px; max-width: 58%; }
.service-rich-text__alignment-lists { display: flex; flex-wrap: wrap; gap: 8px; }
.service-rich-text__segments { display: inline-flex; overflow: hidden; border-radius: 8px; }
.service-rich-text__segments button { border-radius: 0; width: 48px; min-width: 48px; height: 38px; padding: 8px; }
.service-rich-text__segments button + button { border-left: 0; }
.service-rich-text__segments button:first-child { border-radius: 8px 0 0 8px; }
.service-rich-text__segments button:last-child { border-radius: 0 8px 8px 0; }
.service-rich-text__alignment-lists .service-rich-text__segments:last-child button { width: 56px; min-width: 56px; }
.service-rich-text__alignment-lists .service-rich-text__segments { border: 1px solid var(--line, #a8aaa8); border-radius: 8px; }
.service-rich-text__alignment-lists .service-rich-text__segments button { border: 0; border-radius: 0; }
.service-rich-text__alignment-lists .service-rich-text__segments button + button { border-left: 1px solid var(--line, #a8aaa8); }
.service-rich-text__alignment { display: flex; width: 15px; height: 14px; flex-direction: column; gap: 2px; align-items: flex-start; }
.service-rich-text__alignment i { height: 1px; width: 15px; background: currentColor; }
.service-rich-text__alignment i:nth-child(even) { width: 10px; }
.service-rich-text__alignment--center { align-items: center; }
.service-rich-text__alignment--right { align-items: flex-end; }
.service-rich-text__alignment--justify i:nth-child(n) { width: 15px; }
.service-rich-text__color-controls { border-top: 1px solid var(--line, #a8aaa8); margin: 0 -18px; padding: 16px 18px 0; width: calc(100% + 36px); }
.service-rich-text__paint { margin-bottom: 18px; }
.service-rich-text__paint-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 20px; line-height: 1.2; }
.service-rich-text__paint-heading--indicator { justify-content: flex-start; gap: 5px; }
.service-rich-text__paint-heading button { border: 0; background: none; min-height: 28px; padding: 2px 4px; }
.service-rich-text__paint-heading button[data-value="fill"] { font-size: 26px; line-height: 1; }
.service-rich-text__paint-indicator { width: 24px; min-height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.service-rich-text__paint-indicator img { width: 24px; height: 24px; display: block; }
.service-rich-text__paint-row { display: flex; align-items: stretch; width: auto; }
.service-rich-text__swatch { width: 28px; flex: 0 0 28px; border: 1px solid var(--line, #a8aaa8); border-right: none; border-radius: 8px 0 0 8px; display: flex; align-items: center; padding-left: 6px; position: relative; }
.service-rich-text .service-rich-text__swatch-button { width: 20px; min-width: 20px; height: 20px; min-height: 20px; padding: 0; border: 0; border-radius: 3px; background: var(--sce-swatch, #000); box-shadow: none; cursor: pointer; }
.service-rich-text .service-rich-text__swatch-button:hover,
.service-rich-text .service-rich-text__swatch-button[aria-expanded="true"] { background: var(--sce-swatch, #000); box-shadow: 0 0 0 1px #777; }
.service-rich-text__color-popover { right: auto; left: 0; color: #111; font: 10px/1.5 "DM Sans", sans-serif; text-align: left; }
.service-rich-text__swatch.is-empty::after { content: ''; position: absolute; width: 17px; height: 1px; background: #ad3333; transform: rotate(-45deg); pointer-events: none; }
.service-rich-text .service-rich-text__hex { border-radius: 0; border-left: 0; min-width: 0; width: 100px; flex: 0 0 100px; padding-left: 8px; }
.service-rich-text__opacity { width: 70px; flex: 0 0 70px; border: 1px solid var(--line, #a8aaa8); border-left: none; border-radius: 0 8px 8px 0; display: flex; align-items: center; gap: 0; padding-right: 6px; }
.service-rich-text__opacity input { border: 0; border-radius: 0; min-height: 32px; width: 47px; padding: 1px 0 1px 8px; appearance: textfield; }
.service-rich-text__opacity input::-webkit-inner-spin-button { appearance: none; }
.service-rich-text__paint-row > button { border: 0; width: 28px; min-width: 28px; margin-left: 14px; position: relative; padding: 4px; background: transparent; }
.service-rich-text__paint-row > button img { width: 24px; height: 24px; }
.service-rich-text__error { color: #9a2929; font-size: 12px; line-height: 1.35; }
.service-rich-text > .service-rich-text__error { grid-column: 1 / -1; margin: 0 12px 8px; }
.service-rich-text__error:empty { display: none; }
.service-rich-text__popup {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  width: 320px;
  background: white;
  color: var(--ink, #111);
  border: 1px solid var(--line, #a8aaa8);
  border-radius: 6px;
  box-shadow: 0 5px 18px #0003;
  overflow: auto;
  font: 9px/1.3 "DM Sans", sans-serif;
  z-index: 10000;
}
.service-rich-text__popup:not(:popover-open):not(.is-open) { display: none; }
.service-rich-text__popup-header { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px; border-bottom: 1px solid var(--line-soft, #c8cac8); position: sticky; top: 0; background: white; z-index: 1; }
.service-rich-text__popup-header > [role=tablist] { display: flex; gap: 3px; }
.service-rich-text__popup-header button { min-height: 18px; border-color: transparent; font-size: 10px; background: transparent; padding: 2px 5px; }
.service-rich-text__popup-header > button { font-size: 12px; padding: 0 3px; }
.service-rich-text__popup [role=tabpanel] { padding: 6px; }
.service-rich-text__popup [hidden] { display: none !important; }
.service-rich-text__sample { min-height: 37px; padding: 10px 6px; background: #f5f5f5; border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.service-rich-text__setting { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-block: 4px; }
.service-rich-text__setting > span:first-child { flex: 1; }
.service-rich-text__setting select { max-width: 150px; }
.service-rich-text__setting input { width: 60px; }
.service-rich-text__popup .service-rich-text__segments button { width: 22px; min-width: 22px; height: 19px; min-height: 19px; padding: 3px; }
.service-rich-text__popup [data-rich-action="align"] > img,
.service-rich-text__popup [data-rich-action="align"] > .service-rich-text__alignment,
.service-rich-text__popup [data-rich-action="list"] > img { transform: scale(.64); }
.service-rich-text__small-caps-symbol { display: inline-flex; align-items: baseline; line-height: 1; }
.service-rich-text__small-caps-symbol b { font: inherit; font-weight: inherit; }
.service-rich-text__small-caps-symbol small { font-size: .68em; font-weight: inherit; line-height: 1; }
.service-rich-text__popup [data-rich-font-unsupported="true"] { color: #8a8d8b; background: #ededed; opacity: .55; }
.service-rich-text__unit { display: inline-flex; gap: 5px; align-items: center; }
.service-rich-text__support-note { color: #747774; font-size: 8px; margin: 0 0 6px; }
.service-rich-text__link-label { display: grid; gap: 3px; margin-block: 6px 4px; }
.service-rich-text__link-label input { width: 100%; }
.service-rich-text__link-actions, .service-rich-text__history { display: flex; gap: 3px; margin: 4px 0; }
.service-rich-text__popup > .service-rich-text__error { margin: 0 6px 6px; }
.service-description { font: 14px/1.5 "DM Sans", sans-serif; color: #111; overflow-wrap: break-word; }
/* Keep the embedded controls compact inside the calendar's larger form controls.
   Attribute selectors intentionally match the host dialog's typed-input rules. */
.sce-dialog .service-rich-text__opacity input[data-rich-field][type="number"],
.sce-dialog .service-rich-text__paint-row input[data-rich-field][type="text"],
.sce-dialog .service-rich-text__popup input[data-rich-field][type="number"],
.sce-dialog .service-rich-text__popup input[data-rich-field][type="url"] {
  font: inherit;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line, #a8aaa8);
  border-radius: 8px;
  background: #fafafa;
}
.sce-dialog .service-rich-text__opacity input[data-rich-field][type="number"] { width: 47px; min-height: 32px; border: 0; border-radius: 0; padding: 1px 0 1px 8px; }
.sce-dialog .service-rich-text__paint-row input[data-rich-field][type="text"] { width: 100px; border-radius: 0; border-left: 0; padding-left: 8px; }
.sce-dialog .service-rich-text__popup input[data-rich-field][type="number"] { width: 60px; }
.sce-dialog .service-rich-text__popup input[data-rich-field][type="url"] { width: 100%; }
.sce-dialog .service-rich-text__popup input[data-rich-field][type="number"],
.sce-dialog .service-rich-text__popup input[data-rich-field][type="url"],
.sce-dialog .service-rich-text__popup .import-data-select__toggle { min-height: 19px; height: 19px; padding: 2px 4px; border-radius: 4px; }
.sce-dialog .service-rich-text__popup select { font: inherit; width: auto; min-height: 34px; padding: 5px 10px; border-radius: 8px; }
.sce-dialog .service-rich-text__swatch input[type="color"] { width: 20px; height: 20px; min-height: 20px; padding: 0; border: 0; border-radius: 3px; }
.sce-dialog .service-rich-text__popup .service-rich-text__support-note { margin: 0 0 13px; }
.sce-dialog .service-rich-text__popup .service-rich-text__error { margin: 0 15px 12px; }
@media (min-width: 851px) {
  .sce-dialog .service-rich-text { grid-template-columns: minmax(0, 1fr) 155px; min-height: 215px; border-radius: 4px; font-size: 7px; }
  .sce-dialog .service-rich-text__document { min-height: 215px; max-height: 275px; padding: 9px; border-radius: 4px 0 0 4px; font-size: 9px; }
  .sce-dialog .service-rich-text__inspector { padding: 7px 9px 0; gap: 9px; font-size: 8px; }
  .sce-dialog .service-rich-text__inspector-top { font-size: 10px; }
  .sce-dialog .service-rich-text button,
  .sce-dialog .service-rich-text input,
  .sce-dialog .service-rich-text select { min-height: 17px; border-radius: 4px; padding: 2px 4px; }
  .sce-dialog .service-rich-text button img { width: 10px; height: 10px; }
  .sce-dialog .service-rich-text__inspector-top button { width: 16px; height: 16px; padding: 3px; }
  .sce-dialog .service-rich-text__inspector > .service-rich-text__select { width: 122px; }
  .sce-dialog .service-rich-text__inspector > [data-rich-select-field=block] { width: 61px; }
  .sce-dialog .service-rich-text__weight-size { gap: 4px; width: 122px; }
  .sce-dialog .service-rich-text__size { height: 17px; }
  .sce-dialog .service-rich-text__select .import-data-select__toggle,
  .sce-dialog .service-rich-text__weight-size input { height: 17px; min-height: 17px; }
  .sce-dialog .service-rich-text__size .service-rich-text__select { width: 100%; }
  .sce-dialog .service-rich-text__select .import-data-select__toggle { padding: 2px 5px; }
  .sce-dialog .service-rich-text__select .contact-create-multiselect__caret { width: 5px; height: 4px; }
  .sce-dialog .service-rich-text__inspector .service-rich-text__select .import-data-select__menu {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 95px;
    gap: 1px;
    padding: 2px;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 8px;
  }
  .sce-dialog .service-rich-text__inspector .service-rich-text__select .contact-create-single-select__menu [role="option"] {
    min-height: 17px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 8px;
    line-height: 1.2;
  }
  .sce-dialog .service-rich-text .service-rich-text__select .contact-create-single-select__check {
    width: 5px;
    height: 4.25px;
    flex: 0 0 5px;
  }
  .sce-dialog .service-rich-text__size .import-data-select__toggle { height: 17px; min-height: 17px; padding: 2px 5px; border-radius: 4px; }
  .sce-dialog .service-rich-text .service-rich-text__segments button { width: 22px; min-width: 22px; height: 17px; padding: 3px; }
  .sce-dialog .service-rich-text .service-rich-text__segments button:first-child { border-radius: 4px 0 0 4px; }
  .sce-dialog .service-rich-text .service-rich-text__segments button:last-child { border-radius: 0 4px 4px 0; }
  .sce-dialog .service-rich-text__alignment-lists { gap: 6px; }
  .sce-dialog .service-rich-text .service-rich-text__alignment-lists .service-rich-text__segments { border-radius: 4px; }
  .sce-dialog .service-rich-text .service-rich-text__alignment-lists .service-rich-text__segments button { border-radius: 0; }
  .sce-dialog .service-rich-text .service-rich-text__alignment-lists .service-rich-text__segments:last-child button { width: 26px; min-width: 26px; }
  .sce-dialog .service-rich-text__color-controls { margin: 0 -9px; padding: 8px 9px 0; width: calc(100% + 18px); }
  .sce-dialog .service-rich-text__paint { margin-bottom: 9px; }
  .sce-dialog .service-rich-text__paint-heading { margin-bottom: 6px; font-size: 10px; }
  .sce-dialog .service-rich-text__paint-heading button { min-height: 14px; padding: 1px 2px; }
  .sce-dialog .service-rich-text__paint-heading button[data-value="fill"] { font-size: 13px; }
  .sce-dialog .service-rich-text__paint-indicator { width: 12px; min-height: 14px; }
  .sce-dialog .service-rich-text__paint-indicator img { width: 12px; height: 12px; }
  .sce-dialog .service-rich-text__swatch { width: 17px; height: 17px; min-height: 17px; border-radius: 4px 0 0 4px; padding: 0; box-sizing: border-box; justify-content: center; }
  .sce-dialog .service-rich-text .service-rich-text__swatch-button { width: 10px; min-width: 10px; height: 10px; min-height: 10px; border-radius: 2px; }
  .sce-dialog .service-rich-text__color-popover { right: 0; left: auto; }
  .sce-dialog .service-rich-text__paint-row { display: grid; grid-template-columns: 17px minmax(0, 1fr) 35px 5px 14px; width: 100%; min-width: 0; height: 17px; align-items: stretch; }
  .sce-dialog .service-rich-text__paint-row input[data-rich-field][type="text"] { width: 100%; min-width: 0; height: 17px !important; min-height: 17px !important; padding: 2px 0 2px 4px; border-radius: 0 !important; box-sizing: border-box; }
  .sce-dialog .service-rich-text__opacity { width: 35px; height: 17px; min-height: 17px; flex-basis: 35px; padding-right: 3px; border-radius: 0 4px 4px 0; box-sizing: border-box; overflow: hidden; }
  .sce-dialog .service-rich-text__opacity input[data-rich-field][type="number"] { width: 24px; height: 15px; min-height: 0; padding: 1px 0 1px 4px; border: 0 !important; border-radius: 0 !important; background: transparent; box-sizing: border-box; }
  .sce-dialog .service-rich-text__paint-row > button { grid-column: 5; width: 14px; min-width: 14px; height: 17px; min-height: 17px; margin: 0; padding: 2px; box-sizing: border-box; }
  .sce-dialog .service-rich-text__paint-row > button img { width: 12px; height: 12px; }
}
@media (max-width: 700px) {
  .service-rich-text { grid-template-columns: minmax(0, 1fr); }
  .service-rich-text__document { min-height: 220px; border-radius: 8px 8px 0 0; }
  .service-rich-text__inspector { border-left: 0; border-top: 1px solid var(--line, #a8aaa8); }
  .service-rich-text__inspector > .service-rich-text__select, .service-rich-text__weight-size { max-width: 320px; }
  .service-rich-text__color-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 440px) {
  .service-rich-text__color-controls { grid-template-columns: minmax(0, 1fr); }
}
