.text-editor {
  position: relative;

  .ck.ck-toolbar .ck-toolbar__items {
    display: flex;
  }

  .ck.ck-toolbar .ck-toolbar__items > :first-child {
    margin-right: auto;
  }

  .ck-editor__editable {
    transition: box-shadow 0.3s ease;
  }

  .text-editor__overlay {
    display: flex;
    position: absolute;
    z-index: 1000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    align-items: center;
    justify-content: center;

    background-color: rgba(255, 255, 255, 0.9);

    pointer-events: all;
  }

  /* Stop list markers overlapping the edge */
  .ck-editor__editable {
    padding-left: var(--spacing-5) !important;
  }

  p {
    margin-bottom: var(--spacing-4);
  }

  /* Headings scale */
  h1 {
    padding-top: var(--spacing-5);
    padding-bottom: var(--spacing-3);

    font-size: calc(var(--font-size-3) * 2);
    font-weight: var(--font-weight-heavy);
    line-height: 1.2;
  }

  h2 {
    padding-top: var(--spacing-4);
    padding-bottom: var(--spacing-3);

    font-size: calc(var(--font-size-3) * 1.75);
    font-weight: var(--font-weight-heavy);
    line-height: 1.25;
  }

  h3 {
    padding-top: var(--spacing-3);
    padding-bottom: var(--spacing-2);

    font-size: calc(var(--font-size-3) * 1.5);
    font-weight: var(--font-weight-heavy);
    line-height: 1.3;
  }

  h4 {
    padding-top: var(--spacing-2);
    padding-bottom: var(--spacing-2);

    font-size: calc(var(--font-size-3) * 1.25);
    font-weight: var(--font-weight-medium);
    line-height: 1.35;
  }

  h5 {
    padding-top: var(--spacing-2);
    padding-bottom: var(--spacing-1);

    font-size: calc(var(--font-size-3) * 1.125);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
  }

  h6 {
    padding-top: var(--spacing-1);
    padding-bottom: var(--spacing-1);

    font-size: var(--font-size-3);
    font-weight: var(--font-weight-medium);
    line-height: 1.45;
  }

  /* Initial content styles for CKEditor elements */
  blockquote {
    margin: var(--spacing-5) var(--spacing-6) var(--spacing-5) 0;

    border-left: 4px solid #e5e7eb;

    color: #4b5563;
  }

  ul,
  ol {
    margin: 0 0 var(--spacing-5);
    padding-left: var(--spacing-6);
  }

  li {
    margin: 0 0 var(--spacing-2);
  }

  strong {
    font-weight: var(--font-weight-heavy);
  }

  em {
    font-style: italic;
  }

  a {
    color: var(--color-link, #2563eb);
    text-decoration: underline;
  }

  a:hover,
  a:focus {
    text-decoration-thickness: 2px;
  }
}

#canvas-conductor-extension + .ck-body-wrapper {
  .ck-powered-by {
    display: none !important;
  }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); }
}
