/*!
 * JSON 浏览器：路径栏 + 右侧详情（左侧编辑器复用 json-visualizer）
 */
.tool-form-json-browser {
    width: 100%;
    box-sizing: border-box;
}

.tool-form-json-browser.fullscreen {
    display: flex;
    flex-direction: column;
}

.tool-form-json-browser.fullscreen .tool-header-split {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.tool-form-json-browser.fullscreen .json-viz-workspace {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 0;
}

.tool-form-json-browser.fullscreen .tool-info {
    display: none;
}

.tool-form-json-browser .tool-header-split {
    margin-bottom: 10px;
}

.tool-form-json-browser .json-browser-pathbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 10px;
    border-bottom: 1px solid #ececec;
    background: #fff;
    box-sizing: border-box;
}

.tool-form-json-browser .json-browser-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.tool-form-json-browser .json-browser-nav-btn {
    appearance: none;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #434343;
    width: 30px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tool-form-json-browser .json-browser-nav-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tool-form-json-browser .json-browser-nav-btn:hover:not(:disabled) {
    border-color: #1677ff;
    color: #1677ff;
}

.tool-form-json-browser .json-browser-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tool-form-json-browser .json-browser-crumbs {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    flex: 1;
}

.tool-form-json-browser .json-browser-crumb {
    appearance: none;
    border: none;
    background: transparent;
    color: #1677ff;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tool-form-json-browser .json-browser-crumb:hover {
    background: #e6f4ff;
}

.tool-form-json-browser .json-browser-crumb.is-current {
    color: #262626;
    font-weight: 600;
    cursor: default;
}

.tool-form-json-browser .json-browser-crumb-sep {
    color: #bfbfbf;
    font-size: 12px;
    user-select: none;
}

.tool-form-json-browser .json-browser-path-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tool-form-json-browser .json-browser-path-actions .json-viz-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    min-height: 26px;
    padding: 0 8px;
    margin: 0;
    font-size: 12px;
    line-height: 1;
}

.tool-form-json-browser .json-browser-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tool-form-json-browser .json-browser-search-input {
    box-sizing: border-box;
    width: 220px;
    height: 26px;
    padding: 0 64px 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.2;
    color: #333;
    background: #fff;
}

.tool-form-json-browser .json-browser-search-input:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.tool-form-json-browser .json-browser-search-meta {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #8c8c8c;
    pointer-events: none;
    white-space: nowrap;
}

.tool-form-json-browser .json-browser-search-navs {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    gap: 1px;
}

.tool-form-json-browser .json-browser-search-navs button {
    appearance: none;
    border: none;
    background: transparent;
    width: 20px;
    height: 22px;
    color: #8c8c8c;
    cursor: pointer;
    border-radius: 3px;
    font-size: 10px;
    padding: 0;
}

.tool-form-json-browser .json-browser-search-navs button:hover {
    background: #f0f0f0;
    color: #1677ff;
}

.tool-form-json-browser .json-browser-insp-value-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tool-form-json-browser .json-browser-insp-value-head .json-browser-insp-section-title {
    margin-bottom: 0;
}

.tool-form-json-browser .json-browser-insp-copy-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
}

.tool-form-json-browser .json-browser-insp-copy-btn {
    appearance: none;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #595959;
    font-size: 11px;
    line-height: 1;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.tool-form-json-browser .json-browser-insp-copy-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.tool-form-json-browser .json-browser-copy-menu,
.tool-form-json-browser .json-browser-copy-dropdown {
    display: none !important;
}

.tool-form-json-browser .json-browser-inspector {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px;
    background: #f7f8fa;
}

.tool-form-json-browser .json-browser-inspector-empty {
    color: #8c8c8c;
    font-size: 13px;
    line-height: 1.7;
    padding: 12px 4px;
}

.tool-form-json-browser .json-browser-insp-title {
    font-size: 18px;
    font-weight: 650;
    color: #262626;
    word-break: break-word;
    margin: 0 0 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tool-form-json-browser .json-browser-insp-type-inline {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    color: #262626;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tool-form-json-browser .json-browser-insp-type-extra {
    margin-left: 8px;
    font-size: 12px;
    color: #8c8c8c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tool-form-json-browser .json-browser-insp-sub {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.45;
    color: #bfbfbf;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tool-form-json-browser .json-browser-insp-section {
    margin-top: 18px;
}

.tool-form-json-browser .json-browser-insp-section-title {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8c8c8c;
    margin-bottom: 8px;
}

.tool-form-json-browser .json-browser-insp-value {
    font-size: 13px;
    line-height: 1.55;
    color: #262626;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 10px 12px;
}

.tool-form-json-browser .json-browser-insp-json {
    margin: 0;
    max-height: 280px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
    color: #262626;
    word-break: break-word;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 10px 12px;
}

.tool-form-json-browser .json-browser-insp-value a {
    color: #1677ff;
    text-decoration: none;
    word-break: break-all;
}

.tool-form-json-browser .json-browser-insp-value a:hover {
    text-decoration: underline;
}

.tool-form-json-browser .json-browser-color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    vertical-align: middle;
    margin-right: 8px;
}

.tool-form-json-browser .json-browser-insp-props {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    overflow: hidden;
}

.tool-form-json-browser .json-browser-insp-props th,
.tool-form-json-browser .json-browser-insp-props td {
    text-align: left;
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tool-form-json-browser .json-browser-insp-props tr:last-child th,
.tool-form-json-browser .json-browser-insp-props tr:last-child td {
    border-bottom: none;
}

.tool-form-json-browser .json-browser-insp-props th {
    width: 38%;
    color: #8c8c8c;
    font-weight: 500;
    background: #fafafa;
}

.tool-form-json-browser .json-browser-insp-props td {
    color: #262626;
    word-break: break-all;
}

.tool-form-json-browser .json-browser-insp-children,
.tool-form-json-browser .json-browser-insp-related {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    overflow: hidden;
}

.tool-form-json-browser .json-browser-insp-child,
.tool-form-json-browser .json-browser-insp-related-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #262626;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tool-form-json-browser .json-browser-insp-child:last-child,
.tool-form-json-browser .json-browser-insp-related-item:last-child {
    border-bottom: none;
}

.tool-form-json-browser .json-browser-insp-child:hover,
.tool-form-json-browser .json-browser-insp-related-item:hover {
    background: #e6f4ff;
}

.tool-form-json-browser .json-browser-insp-child-key,
.tool-form-json-browser .json-browser-insp-related-path {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 560;
}

.tool-form-json-browser .json-browser-insp-child-type {
    flex-shrink: 0;
    color: #8c8c8c;
    font-size: 11px;
}

.tool-form-json-browser .json-browser-hint {
    margin-top: 10px;
    font-size: 11px;
    color: #8c8c8c;
    line-height: 1.5;
}

.tool-form-json-browser .json-viz-editor-host .ace_marker-layer .json-browser-path-mark {
    position: absolute;
    background: rgba(45, 130, 255, 0.22);
    border-radius: 2px;
}

.tool-form-json-browser .json-viz-editor-host .ace_marker-layer .json-browser-search-mark {
    position: absolute;
    background: rgba(250, 173, 20, 0.28);
    border-radius: 2px;
}

.tool-form-json-browser #json-browser-status.is-ok {
    color: #389e0d;
}

.tool-form-json-browser #json-browser-status.is-error {
    color: #cf1322;
}

@media (max-width: 900px) {
    .tool-form-json-browser .json-viz-pane-left {
        min-width: 0;
    }

    .tool-form-json-browser .json-browser-search-input {
        width: 160px;
        font-size: 10px;
    }
}
