/* === 基础容器 === */
.json-tool-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1e1e1e;
    color: #cccccc;
    height: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    /* 允许内部滚动条显示，避免被父级截断，但通常编辑器自带滚动条 */
    /*overflow: hidden;*/
    margin-top: 15px;
}

/* === 顶部 Header === */
.json-tool-wrapper header {
    height: 50px;
    background-color: #252526;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    flex-shrink: 0;
}

.json-tool-wrapper .logo {
    font-weight: bold;
    font-size: 16px;
    color: #4daafc;
    display: flex;
    align-items: center;
    gap: 10px;
}
.json-tool-wrapper .logo span {
    font-size: 10px;
    background: #3e3e42;
    padding: 2px 6px;
    border-radius: 4px;
    color: #aaa;
}

.json-tool-wrapper .toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* === 按钮样式 === */
.json-tool-wrapper button {
    background: transparent;
    border: 1px solid #454545;
    color: #cccccc;
    padding: 0 12px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    height: 28px;
    line-height: 26px; /* 垂直居中 */
    transition: all 0.2s;
}
.json-tool-wrapper button:hover { background-color: #3e3e42; color: #fff; }
/* 激活状态 (Diff/Query) */
.json-tool-wrapper button.active { background-color: #0e639c; color: white; border-color: #0e639c; }

.json-tool-wrapper button.primary { background-color: #0e639c; border-color: #0e639c; color: white; }
.json-tool-wrapper button.primary:hover { background-color: #1177bb; }

.json-tool-wrapper button.accent { color: #ce9178; border-color: #ce9178; }
.json-tool-wrapper button.accent:hover { background-color: #3e2d2d; }

.json-tool-wrapper .divider { width: 1px; height: 18px; background-color: #454545; margin: 0 4px; }

/* === 查询栏样式 (新增) === */
.query-bar {
    height: 40px;
    background: #2d2d2d;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #ccc;
    flex-shrink: 0;
}
.query-label { font-size: 12px; margin-right: 10px; color: #4daafc; font-weight: bold; }
.query-bar input {
    flex: 1;
    background: #3c3c3c;
    border: 1px solid #454545;
    color: #fff;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
}
.query-bar input:focus { border-color: #0e639c; }

/* === 主体布局 === */
.json-tool-wrapper main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.json-tool-wrapper .pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid #333;
}
.json-tool-wrapper .pane:last-child { border-right: none; }

.json-tool-wrapper .pane-header {
    height: 30px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 11px;
    color: #858585;
    text-transform: uppercase;
}
.json-tool-wrapper .pane-header .actions a {
    color: #858585;
    text-decoration: none;
    margin-left: 10px;
    cursor: pointer;
}
.json-tool-wrapper .pane-header .actions a:hover { color: #fff; }

.json-tool-wrapper .editor-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
}

/* === 底部状态栏 === */
.json-tool-wrapper footer {
    height: 22px;
    background-color: #007acc;
    color: white;
    font-size: 12px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.json-tool-wrapper footer.error { background-color: #c72e0f; }