﻿.editor {
  z-index: 2;
  display: grid;
  gap: 14px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 28;
  background: rgba(22, 37, 31, 0.45);
}

.editor-backdrop[hidden] {
  display: none;
}

.editor.editor-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 30;
  width: min(720px, calc(100vw - 40px));
  height: min(760px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  transform: translate(-50%, -50%);
  overflow: auto;
  border-color: rgba(36, 107, 82, 0.22);
  background:
    linear-gradient(180deg, rgba(232, 243, 239, 0.34), rgba(255, 255, 255, 0.98) 130px),
    var(--surface);
  scrollbar-color: rgba(36, 107, 82, 0.42) transparent;
  scrollbar-width: thin;
}

.editor.editor-modal .editor-head {
  position: sticky;
  top: -18px;
  z-index: 3;
  margin: -18px -18px 0;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(36, 107, 82, 0.1);
  background:
    linear-gradient(180deg, rgba(232, 243, 239, 0.96), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.editor.editor-modal .form-actions {
  position: sticky;
  right: 0;
  bottom: -18px;
  z-index: 3;
  margin: 8px -18px -18px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(36, 107, 82, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.empty-state {
