.custom-analysis-page .request-json-final-card .request-json-final-editor {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  height: 380px;
  padding: 0;
  overflow: hidden;
  resize: vertical;
}

.json-code-actions {
  position: static;
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 8px;
  background: #fff;
}

.json-code-surface {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.json-code-surface .CodeMirror {
  height: 100%;
  background: #fff;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.json-code-surface .CodeMirror pre.CodeMirror-line,
.json-code-surface .CodeMirror pre.CodeMirror-line-like {
  padding: 0 8px;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: normal;
}

.json-code-surface .CodeMirror-gutters {
  background: #f8faff;
  border-right: 1px solid #e2e8f0;
}

.json-code-surface .CodeMirror-linenumber { color: #7b8da8; }
.json-code-surface .CodeMirror-foldgutter { width: 18px; }
.json-code-surface .CodeMirror-foldgutter-open,
.json-code-surface .CodeMirror-foldgutter-folded { color: #526174; }
.json-code-surface .CodeMirror-foldgutter-open::after { content: "▾"; }
.json-code-surface .CodeMirror-foldgutter-folded::after { content: "▸"; }
.json-code-surface .cm-string { color: #dc2626; }
.json-code-surface .cm-property { color: #6354ed; font-weight: 650; }
.json-code-surface .cm-number { color: #167d9a; }
.json-code-surface .cm-atom { color: #8b5cf6; }
.json-code-surface .cm-error { text-decoration: underline wavy #dc2626; }
.json-code-surface .CodeMirror-selected { background: #e0eaff; }
.json-code-surface .CodeMirror-focused .CodeMirror-selected { background: #cfddff; }
.json-code-surface .CodeMirror-matchingbracket { color: #1d4ed8; background: #e0eaff; }
.json-code-surface .CodeMirror-cursor { border-left-color: #334155; }

.json-code-fold-label {
  color: #94afe4;
  font-style: italic;
  font-weight: 600;
  padding: 0 6px;
  cursor: pointer;
}

.json-code-surface .json-code-copy-button {
  vertical-align: middle;
  transform: none;
  cursor: pointer;
}

.json-code-surface .CodeMirror-line:hover .json-code-copy-button,
.json-code-surface .json-code-copy-button:focus-visible,
.json-code-surface .json-code-copy-button.copied {
  opacity: 1;
}

.json-code-surface .json-code-copy-button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.json-code-string-toggle {
  display: inline-block;
  min-height: 18px;
  border: 0;
  border-radius: 3px;
  margin: 0 4px;
  padding: 0 4px;
  background: #f1f5fb;
  color: #7086a8;
  box-shadow: none;
  font: italic 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  vertical-align: baseline;
  cursor: pointer;
}

.json-code-string-toggle:hover {
  background: #eaf2ff;
  color: #2563eb;
  box-shadow: none;
}

.json-code-string-toggle:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

@media (hover: none) {
  .json-code-surface .json-code-copy-button { opacity: 1; }
}

.request-json-final-editor:focus-within { box-shadow: inset 0 0 0 1px #a5c8ff; }
.request-json-final-editor.is-invalid { box-shadow: inset 0 0 0 1px #ef4444; }

.custom-analysis-page .request-json-editor-shell {
  padding-right: 12px;
}
