/* The modern admin shell owns viewport height; the editor gets its remaining row. */
.app-shell--admin:has(.admin-direct-editor) {
  height: var(--app-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}
.app-shell--admin:has(.admin-direct-editor) > .main-content,
.app-shell--admin:has(.admin-direct-editor) .admin-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.app-shell--admin:has(.admin-direct-editor) .admin-shell {
  display: flex;
  flex-direction: column;
}
.app-shell--admin:has(.admin-direct-editor) .admin-mobile-bar { flex: none; }
.app-shell--admin:has(.admin-direct-editor) .admin-workspace {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: auto;
  min-height: 0;
  overflow: hidden;
}
.app-shell--admin:has(.admin-direct-editor) .modern-topbar { flex: none; }
.app-shell--admin:has(.admin-direct-editor) .restored-module {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 16px 24px 12px;
}
.app-shell--admin:has(.admin-direct-editor) .restored-module-heading {
  flex: none;
  margin-bottom: 12px;
}
.app-shell--admin:has(.admin-direct-editor) .restored-module-heading h1 { font-size: 23px; }
.app-shell--admin:has(.admin-direct-editor) .restored-module-heading p { margin-top: 4px; }
.app-shell--admin:has(.admin-direct-editor) .restored-module-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.app-shell--admin .admin-workspace .admin-direct-editor {
  flex: 1;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.app-shell--admin .admin-direct-editor .editor-compact-header { min-width: 0; }
.app-shell--admin .admin-direct-editor .editor-save-state { min-width: 0; overflow: hidden; }
.app-shell--admin .admin-direct-editor .editor-save-state strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell--admin .admin-direct-editor .admin-editor-workbench,
.app-shell--admin .admin-direct-editor .editor-frame { min-height: 0; min-width: 0; }
.app-shell--admin .admin-direct-editor .editor-frame iframe { display: block; }
@media (max-width: 760px) {
  .app-shell--admin:has(.admin-direct-editor) .restored-module { padding: 10px 8px 8px; }
  .app-shell--admin:has(.admin-direct-editor) .restored-module-heading { margin-bottom: 8px; }
  .app-shell--admin:has(.admin-direct-editor) .restored-module-heading h1 { font-size: 20px; }
}
@media (max-height: 650px) {
  .app-shell--admin:has(.admin-direct-editor) .modern-topbar { min-height: 40px; padding-block: 6px; }
  .app-shell--admin:has(.admin-direct-editor) .restored-module { padding-block: 8px; }
  .app-shell--admin:has(.admin-direct-editor) .restored-module-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
  .app-shell--admin:has(.admin-direct-editor) .restored-module-heading h1 { font-size: 20px; }
  .app-shell--admin:has(.admin-direct-editor) .restored-module-heading p { margin: 0; }
}
