.sp-rich-content,
.ck-content {
  color: var(--ar-body-color, var(--bs-body-color, #212529));
  font-size: 1.0625rem;
  line-height: 1.75;
}

.sp-rich-content p,
.ck-content p {
  margin: 0 0 1rem;
}

.sp-rich-content h1,
.sp-rich-content h2,
.sp-rich-content h3,
.sp-rich-content h4,
.sp-rich-content h5,
.sp-rich-content h6,
.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
  color: var(--ar-heading-color, var(--bs-heading-color, inherit));
  margin: 1.5rem 0 .75rem;
  font-weight: 700;
  line-height: 1.25;
}

.sp-rich-content a,
.ck-content a {
  color: var(--ar-link-color, var(--bs-link-color, #0d6efd));
}

.sp-rich-content blockquote,
.ck-content blockquote {
  margin: 1.25rem 0;
  padding: .75rem 1rem;
  border-left: .25rem solid var(--ar-primary, var(--bs-primary, #0d6efd));
  color: var(--ar-body-color, var(--bs-body-color, #212529));
  background: rgba(var(--ar-primary-rgb, var(--bs-primary-rgb, 13, 110, 253)), .08);
}

.sp-rich-content table,
.ck-content table {
  color: inherit;
}

.sp-rich-content img,
.ck-content img {
  max-width: 100%;
  height: auto;
}

/* Match CKEditor 5 image alignment when saved content is rendered outside the editor. */
.sp-rich-content figure.image,
.ck-content figure.image {
  display: table;
  max-width: 100%;
  margin: 1rem auto;
  clear: both;
}

.sp-rich-content figure.image > img,
.ck-content figure.image > img {
  display: block;
  width: 100%;
}

.sp-rich-content figure.image-style-block-align-left,
.ck-content figure.image-style-block-align-left {
  margin-left: 0;
  margin-right: auto;
}

.sp-rich-content figure.image-style-block-align-right,
.ck-content figure.image-style-block-align-right {
  margin-left: auto;
  margin-right: 0;
}

.sp-rich-content figure.image-style-block-align-center,
.ck-content figure.image-style-block-align-center {
  margin-left: auto;
  margin-right: auto;
}

.sp-rich-content figure.image-style-align-left,
.ck-content figure.image-style-align-left {
  float: left;
  margin: .5rem 1.5rem .5rem 0;
}

.sp-rich-content figure.image-style-align-right,
.ck-content figure.image-style-align-right {
  float: right;
  margin: .5rem 0 .5rem 1.5rem;
}

.sp-command-block,
.sp-rich-content pre,
.ck-content pre,
.fs-lg pre {
  margin: 1.5rem 0;
  border-radius: .65rem;
  background: #101827;
  color: #f8fafc;
}

.sp-command-block {
  overflow: hidden;
  box-shadow: 0 .75rem 2rem rgba(15, 23, 42, .16);
}

.sp-command-block__toolbar {
  display: flex;
  justify-content: flex-end;
  min-height: 2.75rem;
  padding: .55rem .75rem;
  background: #263451;
}

.sp-command-block__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  min-height: 1.7rem;
  padding: .25rem .8rem;
  border: 0;
  border-radius: 999px;
  background: #777bd8;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.sp-command-block__copy:hover,
.sp-command-block__copy:focus {
  background: #6267d4;
  transform: translateY(-1px);
}

.sp-command-block pre,
.sp-rich-content pre,
.ck-content pre,
.fs-lg pre {
  overflow-x: auto;
  padding: 1.25rem 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .9375rem;
  line-height: 1.65;
  white-space: pre;
}

.sp-command-block pre {
  margin: 0;
  padding-top: .8rem;
  border-radius: 0;
  box-shadow: none;
}

.sp-command-block code,
.sp-rich-content pre code,
.ck-content pre code,
.fs-lg pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}

.sp-restricted-preview-group {
  display: block;
  max-height: 8.75em;
  max-height: calc((1lh * 4) + 1.75em);
  overflow: hidden;
  color: rgba(var(--bs-body-color-rgb, 33, 37, 41), .72);
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, .9) 18%,
    rgba(0, 0, 0, .58) 48%,
    rgba(0, 0, 0, .22) 78%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, .9) 18%,
    rgba(0, 0, 0, .58) 48%,
    rgba(0, 0, 0, .22) 78%,
    rgba(0, 0, 0, 0) 100%
  );
}

.sp-restricted-preview {
  display: -webkit-box;
  max-height: 7em;
  max-height: calc(1lh * 4);
  overflow: hidden;
  color: inherit !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, .9) 18%,
    rgba(0, 0, 0, .58) 48%,
    rgba(0, 0, 0, .22) 78%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, .9) 18%,
    rgba(0, 0, 0, .58) 48%,
    rgba(0, 0, 0, .22) 78%,
    rgba(0, 0, 0, 0) 100%
  );
}

.sp-restricted-preview-group > :first-child {
  margin-top: 0;
}

.sp-restricted-preview-group > :last-child {
  margin-bottom: 0;
}

.sp-restricted-preview-group .sp-restricted-preview {
  display: inline;
  max-height: none;
  overflow: visible;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
  line-clamp: initial;
  -webkit-mask-image: none;
  mask-image: none;
}

.sp-restricted-preview :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, a) {
  color: inherit !important;
}

.sp-restricted-preview-auth {
  --sp-restricted-preview-rgb: var(--bs-body-color-rgb, 33, 37, 41);
}

.sp-restricted-preview-community {
  --sp-restricted-preview-rgb: var(--bs-body-color-rgb, 33, 37, 41);
}

.sp-restricted-preview:is(p, div, section, article, blockquote, li, h1, h2, h3, h4, h5, h6) {
  color: inherit !important;
}

.sp-restricted-preview-step-1 {
  color: inherit !important;
}

.sp-restricted-preview-step-2 {
  color: inherit !important;
}

[data-bs-theme="dark"] .sp-restricted-preview-group,
html[data-bs-theme="dark"] .sp-restricted-preview-group {
  color: rgba(233, 236, 239, .72);
}

.sp-restricted-preview-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  margin: .75rem 0 1.5rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), .22);
  border-radius: .75rem;
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), .06);
}

.sp-restricted-preview-cta__text {
  flex: 1 1 16rem;
  color: var(--ar-body-color, var(--bs-body-color, #212529));
  font-size: .95rem;
  line-height: 1.45;
}

.sp-restricted-preview-cta__button {
  flex: 0 0 auto;
  color: #fff !important;
  text-decoration: none;
}

.sp-restricted-preview-cta__button:hover,
.sp-restricted-preview-cta__button:focus,
.sp-restricted-preview-cta__button:active {
  color: #fff !important;
  text-decoration: none;
}

.ck.ck-editor__editable_inline {
  min-height: 18rem;
  background: var(--ar-body-bg, var(--bs-body-bg, #fff)) !important;
  color: var(--ar-body-color, var(--bs-body-color, #212529)) !important;
  border-color: var(--ar-border-color, var(--bs-border-color, #dee2e6)) !important;
}

.ck.ck-editor__editable_inline.ck-focused {
  border-color: var(--ar-primary, var(--bs-primary, #0d6efd)) !important;
  box-shadow: 0 0 0 .2rem rgba(var(--ar-primary-rgb, var(--bs-primary-rgb, 13, 110, 253)), .16) !important;
}

[data-bs-theme="dark"] .ck.ck-editor__editable_inline,
html[data-bs-theme="dark"] .ck.ck-editor__editable_inline {
  background: var(--ar-body-bg, #121519) !important;
  color: var(--ar-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .ck.ck-editor__editable_inline *,
html[data-bs-theme="dark"] .ck.ck-editor__editable_inline * {
  caret-color: var(--ar-body-color, #e9ecef);
}

[data-bs-theme="dark"] .ck.ck-editor__editable_inline .text-body-secondary,
html[data-bs-theme="dark"] .ck.ck-editor__editable_inline .text-body-secondary {
  color: var(--ar-secondary-color, #adb5bd) !important;
}
