/* Editor de célula: abre junto à célula escolhida, sem ocupar uma coluna da tela. */
.crx-workspace { display: block; }

.crx-editor-popover {
  position: fixed;
  z-index: 9000;
  left: var(--crx-popup-left, 50%);
  top: var(--crx-popup-top, 20%);
  width: min(336px, calc(100vw - 24px));
  transform: translateZ(0);
}

.crx-editor-popover .crx-editor {
  position: static;
  display: block;
  max-height: min(640px, calc(100vh - 24px));
  overflow: auto;
  border: 2px solid var(--crx-ink);
  background: var(--crx-paper);
  box-shadow: 7px 7px 0 var(--crx-ink);
}

.crx-editor-popover .crx-editor > header {
  position: sticky;
  top: 0;
  z-index: 1;
}

html[data-egghead-theme="dark"] .crx-editor-popover .crx-editor {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  box-shadow: 7px 7px 0 #090a0c;
}

html[data-egghead-theme="dark"] .crx-editor-popover .crx-editor > header { background: #806e25; }

@media (max-width: 700px) {
  .crx-editor-popover { width: min(360px, calc(100vw - 20px)); }
  .crx-editor-popover .crx-editor { max-height: calc(100vh - 20px); }
}
