.block-editor-layout {
  display: grid;
  gap: var(--ui-space-4);
  min-width: 0;
}

.block-editor-layout__main,
.block-editor-layout__sidebar {
  min-width: 0;
}

/* The cabinet's 600px form limit is for settings forms, not the editor canvas. */
.block-editor-form,
.base-module .block-editor-form {
  width: 100%;
  max-width: none;
}

exam-task-editor {
  container: exam-editor / inline-size;
}

exam-task-editor [data-exam-preview] {
  overflow-wrap: anywhere;
}

@container exam-editor (min-width: 52rem) {
  exam-task-editor .block-editor-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
  }

  exam-task-editor .block-editor-layout__sidebar {
    position: sticky;
    top: var(--ui-space-3);
  }

  exam-task-editor [data-exam-preview] {
    max-block-size: min(64dvh, 44rem);
    overflow-y: auto;
  }
}
