/* ==========================================================================
   JSON editor widget skin.

   Consolidated out of theme.css / theme-override.css. Loads immediately after
   theme-override.css, before components/, so every rule keeps the relative
   cascade position it had before the move.
   ========================================================================== */

/* ----- from theme-override.css ----- */


/* ============================================
   JSON EDITOR - Dark theme override
   ============================================ */
.jsoneditor {
    border: 1px solid var(--input-border) !important;
    border-radius: 6px;
    overflow: hidden;
}

.jsoneditor-menu {
    background-color: rgba(20, 22, 28, 0.95) !important;
    border-bottom: 1px solid var(--border-normal) !important;
}

.jsoneditor-menu > button,
.jsoneditor-menu > .jsoneditor-modes > button {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
    opacity: 0.85;
}

.jsoneditor-menu > button:hover,
.jsoneditor-menu > .jsoneditor-modes > button:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.2) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
}

.jsoneditor-menu > button:disabled {
    opacity: 0.35;
}

.jsoneditor-menu a.jsoneditor-poweredBy {
    color: var(--text-muted) !important;
}

/* Ace editor (code mode) */
.ace-jsoneditor,
.ace-jsoneditor .ace_scroller,
.ace-jsoneditor .ace_content {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
}

.ace-jsoneditor .ace_gutter {
    background-color: rgba(20, 22, 28, 0.9) !important;
    color: var(--text-tertiary) !important;
    border-right: 1px solid var(--border-subtle);
}

.ace-jsoneditor .ace_gutter-active-line {
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

.ace-jsoneditor .ace_marker-layer .ace_active-line {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.ace-jsoneditor .ace_marker-layer .ace_selection {
    background-color: rgba(var(--bs-primary-rgb), 0.3) !important;
}

.ace-jsoneditor .ace_cursor {
    color: var(--text-primary) !important;
}

.ace-jsoneditor .ace_print-margin {
    background-color: var(--border-subtle) !important;
}

.ace-jsoneditor .ace_indent-guide {
    background: none !important;
}

/* Syntax highlighting */
.ace-jsoneditor .ace_variable {
    color: #7dd3fc !important;
}

.ace-jsoneditor .ace_string {
    color: #86efac !important;
}

.ace-jsoneditor .ace_constant.ace_numeric {
    color: #fbbf24 !important;
}

.ace-jsoneditor .ace_constant.ace_language.ace_boolean,
.ace-jsoneditor .ace_constant.ace_language {
    color: #c4b5fd !important;
}

.ace-jsoneditor .ace_paren,
.ace-jsoneditor .ace_punctuation {
    color: var(--text-secondary) !important;
}

/* Text mode textarea */
textarea.jsoneditor-text {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
}

/* Status bar (Ln/Col) */
.jsoneditor-statusbar {
    background-color: rgba(20, 22, 28, 0.95) !important;
    color: var(--text-tertiary) !important;
    border-top: 1px solid var(--border-normal) !important;
}

/* Tree/field values - fallback for tree mode */
div.jsoneditor-field,
div.jsoneditor-value,
div.jsoneditor td,
div.jsoneditor th,
div.jsoneditor textarea,
pre.jsoneditor-preview {
    color: var(--text-primary) !important;
}