/* Frontend-theme node add/edit: readable form layout and visible CKEditor content. */
body.frontend-node-form .node-form {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 0 2rem;
}

body.frontend-node-form .ck-editor__main {
  min-height: 320px;
}

body.frontend-node-form .ck-editor__editable {
  min-height: 300px;
  color: #222;
  background: #fff;
}

/* CKEditor 5 renders inline, so frontend theme CSS applies inside the editor.
 * Scroll-reveal animation classes default to opacity: 0 until JS adds .active. */
body.frontend-node-form .ck-editor__editable .reveal,
body.frontend-node-form .ck-editor__editable .slide-left,
body.frontend-node-form .ck-editor__editable .slide-right,
body.frontend-node-form .ck-editor__editable .scale-up,
body.frontend-node-form .ck-editor__editable .slide-up {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  filter: none !important;
}

body.frontend-node-form .ck-editor__editable .about-us-main-content {
  display: block;
}

body.frontend-node-form .ck-editor__editable .static-image-box {
  width: auto;
  max-width: 100%;
}

body.frontend-node-form .ck-editor__editable .custom-container {
  overflow: visible;
}

body.frontend-node-form .form-item__description,
body.frontend-node-form .description {
  background: #fff;
  color: #222;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  line-height: 1.5;
  white-space: pre-line;
}

/* About Us (node 5) and Resource (node 57): simplified edit form. */
body.simplified-node-edit .node-form {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* Hide advanced sections editors do not need. */
body.simplified-node-edit #edit-meta,               /* Status */
body.simplified-node-edit #edit-field-meta-tags-0,  /* Meta Tags */
body.simplified-node-edit #edit-revision-information,
body.simplified-node-edit #edit-path-0,             /* URL alias */
body.simplified-node-edit #edit-author,             /* Authoring information */
body.simplified-node-edit #edit-options {           /* Promotion options */
  display: none;
}

/* Hide empty vertical tabs menu (the thin line below Text format). */
body.simplified-node-edit .vertical-tabs__menu {
  display: none;
}

/* Menu is hidden, so let tab panes use full width without extra min-height. */
body.simplified-node-edit .vertical-tabs {
  display: block;
}

body.simplified-node-edit .vertical-tabs__panes {
  width: 100%;
  margin-block-start: 0;
}

body.simplified-node-edit .vertical-tabs__pane {
  min-height: auto;
}

/* Resource page does not use hero image, body summary, or read more link. */
body.resource-node-57 .field--name-field-image,
body.resource-node-57 .field--name-field-read-more,
body.resource-node-57 .form-item-body-0-summary,
body.resource-node-57 #edit-body-0-summary {
  display: none;
}

/* Compact file-upload help text (avoid large empty box). */
body.simplified-node-edit .field--name-field-image .form-item__description {
  padding: 0.25rem 0;
  border: none;
  font-weight: 400;
  background: transparent;
}

body.simplified-node-edit .field--name-field-image .form-managed-file {
  min-height: auto;
}

body.simplified-node-edit .form-item-body-0-summary textarea {
  min-height: 5rem;
}

body.simplified-node-edit .form-item {
  margin-block: var(--sp0-75);
}

/* Form field descriptions: readable background and bold text. */
body.simplified-node-edit .form-item__description,
body.simplified-node-edit .description {
  background: #fff;
  color: #222;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  line-height: 1.5;
  white-space: pre-line;
}

body.simplified-node-edit .form-item__description .placeholder,
body.simplified-node-edit .description .placeholder,
body.simplified-node-edit .form-item__description em.placeholder,
body.simplified-node-edit .description em.placeholder {
  background: transparent;
  color: #222;
  font-weight: 700;
}

/* Hide the helper description under the Read More URL field (About Us). */
body.simplified-node-edit #edit-field-read-more-0-uri--description {
  display: none;
}

body.simplified-node-edit .ck-editor__editable .about-us-main-content {
  display: block;
}

body.simplified-node-edit .ck-editor__editable .static-image-box {
  width: auto;
  max-width: 100%;
}

body.simplified-node-edit .ck-editor__editable .custom-container {
  overflow: visible;
}
