/* Only the modern read-only inspector; classic JSONViewer keeps its original styles. */
.json-inspector { color: var(--theme-text); min-width: 0; }
.json-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--theme-border); }
.json-inspector .json-button { border: 1px solid var(--theme-border); border-radius: 5px; background: var(--theme-raised); color: var(--theme-text); padding: 6px 10px; width: auto; font: 13px/1.4 var(--theme-font); cursor: pointer; }
.json-inspector .json-button:hover { background: var(--theme-hover); }
.json-inspector .json-button:disabled { opacity: .5; cursor: default; }
.json-inspector .json-button:focus-visible, .json-search:focus-visible, .json-row:focus-visible, .json-raw:focus-visible { outline: 2px solid var(--theme-focus); outline-offset: 2px; }
.json-modes { display: flex; gap: 3px; }
.json-inspector .json-modes [aria-pressed="true"] { background: var(--theme-selection); border-color: var(--theme-accent); color: var(--theme-heading); }
.json-inspector .json-search { flex: 1 1 220px; width: auto; min-width: 100px; max-width: 420px; padding: 6px 10px; border: 1px solid var(--theme-border); border-radius: 5px; background: var(--theme-surface); color: var(--theme-text); font: 14px/1.4 var(--theme-font); }
.json-search::placeholder { color: var(--theme-muted); opacity: 1; }
.json-status { color: var(--theme-muted); font-size: 12px; margin: 10px 0 16px; overflow-wrap: anywhere; }
.json-tree { font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.json-item { position: relative; min-width: 0; }
.json-row { padding: 5px 112px 5px 22px; min-height: 32px; border-radius: 4px; overflow-wrap: anywhere; }
.json-row:hover { background: var(--theme-hover); }
summary.json-row { cursor: pointer; list-style: none; position: relative; }
summary.json-row::-webkit-details-marker { display: none; }
summary.json-row::before { content: '›'; position: absolute; left: 5px; color: var(--theme-muted); }
.json-branch[open] > summary.json-row::before { transform: rotate(90deg); }
.json-key { color: var(--theme-heading); }
.json-count { color: var(--theme-muted); font-size: 12px; }
.json-string { color: var(--theme-json-string); white-space: pre-wrap; }
.json-number, .json-boolean { color: var(--theme-json-number); }
.json-null { color: var(--theme-muted); font-style: italic; }
.json-children { margin-left: 12px; padding-left: 9px; border-left: 1px solid var(--theme-border); }
.json-row-actions { position: absolute; right: 4px; top: 3px; display: flex; gap: 4px; opacity: 0; }
.json-item:hover > .json-row-actions, .json-item:focus-within > .json-row-actions { opacity: 1; }
.json-inspector .json-row-actions .json-button { font-size: 11px; padding: 3px 6px; }
.json-inspector .json-match { background: var(--theme-selection); color: var(--theme-heading); border-radius: 2px; padding: 0; outline: 1px solid var(--theme-accent); }
.json-raw { padding: 16px; margin: 0; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-raised); color: var(--theme-text); font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; overflow: auto; max-height: 75vh; white-space: pre; tab-size: 2; }
.json-empty { padding: 24px 8px; color: var(--theme-muted); }
.json-copy-buffer { position: fixed; left: -10000px; top: 0; }
@media (hover: none) { .json-row-actions { opacity: 1; } }
@media (max-width: 700px) {
    .json-inspector .json-search { max-width: none; flex-basis: 100%; order: 1; font-size: 16px; }
    .json-children { margin-left: 5px; padding-left: 5px; }
    .json-row { padding-right: 100px; }
    .json-row-actions { opacity: 1; }
}

.result-panel .json-toolbar { position: sticky; top: var(--result-heading-height, 80px); z-index: 10; background: var(--theme-surface); padding-top: 10px; }
.json-payload-label { display: flex; align-items: center; gap: 7px; color: var(--theme-muted); font: 12px/1.4 var(--theme-font); }
.json-inspector .json-payload-select { min-width: 0; max-width: 100%; padding: 6px 8px; border: 1px solid var(--theme-border); border-radius: 5px; background: var(--theme-raised); color: var(--theme-text); font: 13px/1.4 var(--theme-font); }
.json-payload-select:focus-visible { outline: 2px solid var(--theme-focus); outline-offset: 2px; }
.json-payload-help { color: var(--theme-muted); font: 12px/1.5 var(--theme-font); margin: 10px 0 0; }
.result-panel-expanded .json-raw { max-height: none; }
@media (max-width: 700px) {
    .json-payload-label { flex-basis: 100%; }
    .json-inspector .json-payload-select { font-size: 16px; flex: 1; }
}
