/* Remove CKEditor logo that appears on focus */
.ck-powered-by {
  display: none;
}

/* Make padding even around content */
.ck.ck-editor__editable_inline {
  padding: var(--m) !important;
}

/* Hide disabled style buttons */
/* @todo: https://github.com/ckeditor/ckeditor5/issues/12770 */
.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled {
  display: none !important;
}

/* Unify CKEditor content spacing */
.ck.ck-content h1,
.ck.ck-content h2,
.ck.ck-content h3,
.ck.ck-content li,
.ck.ck-content p {
  line-height: 1.5;
  margin-bottom: 1rem !important;
}

.ck.ck-content h1:last-child,
.ck.ck-content h2:last-child,
.ck.ck-content h3:last-child,
.ck.ck-content li:last-child,
.ck.ck-content p:last-child {
  margin-bottom: 0 !important;
}

/*
 * Block styles
 */

.ck.ck-content {
  font-size: 1rem;
}

.ck.ck-content h1,
.ck.ck-content h2,
.ck.ck-content h3 {
  font-weight: 600;
  line-height: 1.1;
}

.ck.ck-content h1 {
  font-size: 2.6rem;
}

.ck.ck-content h2 {
  font-size: 2.2rem;
}

.ck.ck-content h3 {
  font-size: 2.0rem;
}

.ck.ck-content ol.large,
.ck.ck-content ul.large,
.ck.ck-content p.large {
  font-size: 1.4rem;
}

.ck.ck-content ol.small,
.ck.ck-content ul.small,
.ck.ck-content p.small {
  font-size: 0.8rem;
}

/**
 * Special case for quote block text
 */

[data-type="quote"] [id*="quote-field"] .ck.ck-content p {
  font-size: 1.8rem;
}

[data-type="quote"] [id*="credit-field"] .ck.ck-content p {
  font-size: 1.2rem;
}


/**
 * Special case for ‘Credits’ blocks
 */

[id*="fields-credits"] {
  height: 100% !important;
}

[id*="fields-credits"] td:not(.action) {
  vertical-align: top !important;
  height: 100% !important;
  padding: 0 !important;
}

[id*="fields-credits"] .redactor,
[id*="fields-credits"] .redactor-box {
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
}

[id*="fields-credits"] .redactor-focus {
  z-index: 10 !important;
}

[id*="fields-credits"] .field,
[id*="fields-credits"] .input {
  height: 100% !important;
  margin: 0 !important;
}
