/**
 * YOOAdmin Dark Engine v2 — file editor layer.
 *
 * @package YOOAdmin_Studio_Hub
 */

/* Editor surface. */
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .CodeMirror {
  background: var(--yp-dark-surface-sunken);
  color: var(--yp-dark-text);
  border-color: var(--yp-dark-border);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .CodeMirror-gutters {
  background: var(--yp-dark-surface);
  border-right-color: var(--yp-dark-border-soft);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  :is(.CodeMirror-linenumber, .CodeMirror-guttermarker-subtle) {
  color: var(--yp-dark-text-faint);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .CodeMirror-cursor {
  border-left-color: var(--yp-dark-text);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .CodeMirror-selected {
  background: rgba(125, 180, 255, 0.18);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-comment {
  color: #6b7c93;
}
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-keyword {
  color: #c792ea;
}
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-string {
  color: #c3e88d;
}
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-variable,
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-variable-2 {
  color: #82aaff;
}
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-number,
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-atom {
  color: #f78c6c;
}
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-tag {
  color: #f07178;
}
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .cm-s-default .cm-attribute {
  color: #ffcb6b;
}

/* File list sidebar. */
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  :is(#templateside, .fileedit-sub) {
  background: var(--yp-dark-surface);
  color: var(--yp-dark-text);
  border-color: var(--yp-dark-border);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  :is(#templateside h2, #templateside a, .fileedit-sub label) {
  color: var(--yp-dark-text);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  #templateside .highlight {
  background: var(--yp-dark-surface-raised);
  color: var(--yp-dark-accent);
}

/* Documentation lookup + selects. */
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  :is(#docs-list, select, input[type='text']) {
  background: var(--yp-dark-field);
  border: 1px solid var(--yp-dark-field-border);
  color: var(--yp-dark-text);
  color-scheme: dark;
}

/* Warning modal. */
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .file-editor-warning .file-editor-warning-content {
  background: var(--yp-dark-surface);
  color: var(--yp-dark-text);
}

html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  .file-editor-warning .file-editor-warning-dismiss {
  color: var(--yp-dark-text-muted);
}

/* Textarea fallback. */
html[data-yooadmin-studio-color-mode-effective='dark']
  body.yp-dark-v2-files
  #wpbody-content
  #template textarea#newcontent {
  background: var(--yp-dark-surface-sunken);
  color: var(--yp-dark-text);
  border-color: var(--yp-dark-border);
}
