/*
 * JSON 格式化校验样式
 * ============================================================================
 * 版权所有 (C) 西安尊云信息科技有限公司，并保留所有权利。
 * 网站地址: http://www.zunyunkeji.com
 * ----------------------------------------------------------------------------
 * 许可声明：未经许可不得将本软件的整体或任何部分用于商业用途及再发布。
 * ============================================================================
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
 *
 * 修改说明：补充介绍/FAQ 样式与编辑区全屏
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
*/
.tool-privacy-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 14px;
    border: 1px solid #c9dbf7;
    border-radius: 999px;
    background: #f3f7ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
}
.tool-field { display: flex; align-items: center; gap: 10px; color: #334155; font-size: 14px; }
.tool-check { display: inline-flex; align-items: center; gap: 8px; color: #475569; font-size: 14px; }
.tool-check input { width: 16px; height: 16px; }
.tool-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}
.tool-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #d9e3f1;
    border-radius: 10px;
    background: #fff;
}
.tool-feature-item i { flex-shrink: 0; margin-top: 3px; color: #2563eb; }
.tool-feature-item p {
    margin: 0;
    min-width: 0;
    color: #52627a;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.tool-seo-block {
    margin-top: 22px;
    padding: 24px 26px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
}
.tool-seo-block h2 { margin: 0 0 12px; color: #1c2f4c; font-size: 20px; }
.tool-seo-block h2::after { display: none; }
.tool-seo-block p { margin: 0; color: #61728a; font-size: 15px; line-height: 1.9; }
.tool-seo-block p + p,
.tool-seo-block p + ul,
.tool-seo-block ul + p { margin-top: 12px; }
.tool-seo-block code,
.tool-json-faq-item code {
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef3fb;
    color: #1d4ed8;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}
.tool-seo-block kbd {
    display: inline-block;
    padding: 1px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    color: #334155;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}
.tool-json-intro-list {
    margin: 0;
    padding-left: 1.2em;
    color: #61728a;
    font-size: 15px;
    line-height: 1.9;
}
.tool-json-intro-list li + li { margin-top: 6px; }
.tool-json-faq-list { display: grid; gap: 10px; }
.tool-json-faq-item {
    border: 1px solid #e5edf7;
    border-radius: 10px;
    background: #f8fbff;
    overflow: hidden;
}
.tool-json-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    color: #1c2f4c;
    font-size: 15px;
    font-weight: 650;
    user-select: none;
}
.tool-json-faq-item summary::-webkit-details-marker { display: none; }
.tool-json-faq-item summary::before {
    content: '+';
    display: inline-block;
    width: 1.1em;
    margin-right: 8px;
    color: #2563eb;
    font-weight: 700;
}
.tool-json-faq-item[open] summary::before { content: '−'; }
.tool-json-faq-item p {
    margin: 0;
    padding: 0 16px 14px 16px;
    color: #61728a;
    font-size: 14px;
    line-height: 1.85;
}

.tool-json-section { padding: 48px 0 72px; background: #f7f9fc; }
.tool-json-panel {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
}
.tool-json-panel.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10050;
    margin: 0;
    border-radius: 0;
    border: 0;
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
}
.tool-json-panel.is-fullscreen .tool-json-toolbar,
.tool-json-panel.is-fullscreen .tool-json-status-bar,
.tool-json-panel.is-fullscreen .tool-json-path-row,
.tool-json-panel.is-fullscreen .tool-json-path-result {
    flex-shrink: 0;
}
.tool-json-panel.is-fullscreen .tool-json-editor-wrap {
    flex: 1 1 auto;
    min-height: 240px;
    height: auto;
}
.tool-json-panel.is-fullscreen .tool-json-editor {
    min-height: 240px;
    height: 100%;
    resize: none;
}
.tool-json-panel.is-fullscreen .tool-json-path-result {
    max-height: 120px;
}
.tool-json-panel.is-fullscreen .tool-json-gutter {
    display: block;
}
.tool-json-panel.is-fullscreen .tool-json-editor-wrap {
    grid-template-columns: 52px minmax(0, 1fr);
}
body.tool-json-fs-open {
    overflow: hidden;
}
.tool-json-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    margin-bottom: 14px;
}
.tool-json-toolbar select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d5e0ef;
    border-radius: 8px;
    background: #fff;
}
.tool-json-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.tool-json-actions .btn,
.tool-json-actions .m-btn,
.tool-json-path-row .btn,
.tool-json-path-row .m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
    line-height: 1;
}
.tool-json-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.tool-json-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}
.tool-json-status i { font-size: 10px; }
.tool-json-status.is-idle { background: #f1f5f9; color: #64748b; }
.tool-json-status.is-ok { background: #ecfdf5; color: #047857; }
.tool-json-status.is-err { background: #fef2f2; color: #b91c1c; }
.tool-json-meta { color: #64748b; font-size: 13px; }

.tool-json-editor-wrap {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 360px;
    border: 1px solid #d9e3f1;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
}
.tool-json-gutter {
    padding: 14px 8px;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    background: #111827;
    color: #64748b;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    text-align: right;
    user-select: none;
    overflow: hidden;
}
.tool-json-editor {
    width: 100%;
    min-height: 360px;
    height: 360px;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    white-space: pre;
    overflow: auto;
}
.tool-json-editor.has-error {
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.45);
}

.tool-json-path-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}
.tool-json-path-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.tool-json-path-field > span {
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}
.tool-json-path-row input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d5e0ef;
    border-radius: 8px;
    box-sizing: border-box;
}
.tool-json-path-result {
    margin: 12px 0 0;
    max-height: 180px;
    overflow: auto;
    padding: 14px;
    border: 1px solid #e5edf7;
    border-radius: 10px;
    background: #f8fbff;
    color: #334155;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.tool-json-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8eef7;
}
.tool-json-tabs button {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #d5e0ef;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
}
.tool-json-tabs button.is-active {
    border-color: #2563eb;
    background: #edf3ff;
    color: #2563eb;
    font-weight: 650;
}
.tool-json-tab-panel { display: none; }
.tool-json-tab-panel.is-active { display: block; }

.tool-json-tree {
    max-height: 420px;
    overflow: auto;
    padding: 8px 4px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
}
.tool-json-tree-node { margin-left: 18px; }
.tool-json-tree-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-json-tree-key { color: #1d4ed8; }
.tool-json-tree-type { color: #64748b; }
.tool-json-tree-value { color: #0f766e; word-break: break-word; }
.tool-json-tree-value.is-null,
.tool-json-tree-value.is-bool { color: #b45309; }
.tool-json-tree-value.is-number { color: #c2410c; }

.tool-json-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.tool-json-stat {
    padding: 14px 16px;
    border: 1px solid #e5edf7;
    border-radius: 10px;
    background: #f8fbff;
}
.tool-json-stat span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
}
.tool-json-stat strong {
    color: #1c2f4c;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 1023px) {
    .tool-json-actions { margin-left: 0; width: 100%; }
    .tool-json-path-row,
    .tool-json-stats,
    .tool-feature-grid { grid-template-columns: 1fr; }
    .tool-json-path-row .btn,
    .tool-json-path-row .m-btn { width: 100%; }
}

@media (max-width: 767px) {
    .tool-json-section { padding: 28px 0 48px; }
    .tool-json-panel { padding: 16px; }
    .tool-json-editor-wrap,
    .tool-json-editor { min-height: 260px; height: 260px; }
    .tool-json-gutter { display: none; }
    .tool-json-editor-wrap { grid-template-columns: 1fr; }
}
