/* 游戏开发 / 测试协助 UI */

/* ── 底部代码注入 Dock（上：注入代码，下：控制台） ── */
.copilot-root .inspect-pane #copilot-inject-console-dock:not(.copilot-inject-console-expanded) {
    display: none;
}

.copilot-root .inspect-pane.copilot-inject-console-expanded:has(#copilot-inject-console-dock) > .dev-panel {
    bottom: var(--copilot-inject-console-body-h, 75vh) !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    font-size: 11px;
}

.copilot-root .inspect-pane .copilot-inject-console-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--inspect-bg, #0d1117);
    border-top: 1px solid var(--inspect-border, #30363d);
}

.copilot-root .inspect-pane .copilot-inject-console-body[hidden] {
    display: none !important;
}

.copilot-root .inspect-pane .copilot-inject-console-expanded .copilot-inject-console-body:not([hidden]) {
    display: flex !important;
}

.copilot-root .inspect-pane #copilot-inject-dock-split {
    flex: 0 0 4px;
    height: 4px;
    min-height: 4px;
    cursor: ns-resize;
    background: var(--inspect-border, #30363d);
    touch-action: none;
    user-select: none;
}

.copilot-root .inspect-pane #copilot-inject-dock-split:hover,
.copilot-root .inspect-pane #copilot-inject-dock-split.copilot-inject-dock-split-active {
    background: var(--inspect-accent, #0e639c);
}

.copilot-root .inspect-pane #copilot-inject-console-dock #codeEditorView {
    flex: 1 1 auto;
    min-height: 0;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    z-index: auto !important;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock #codeEditorView[hidden] {
    display: none !important;
}

/* 注入 Dock 内紧凑顶栏与工具条 */
.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTop {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTitle {
    font-size: 12px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTitleRight button {
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 5px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTools {
    min-height: 30px !important;
    padding: 3px 8px !important;
    gap: 3px 8px !important;
    font-size: 10px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTools select {
    height: 22px !important;
    min-width: 88px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTools .topButton,
.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorTools button {
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    line-height: 20px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorOutputToolbarMain {
    padding: 2px 6px !important;
    gap: 4px 6px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorOutputToolbar span.codeEditorOutputTitle {
    font-size: 11px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorOutputLevel,
.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorOutputSourceBtn {
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorOutputFilter {
    height: 20px !important;
    font-size: 10px !important;
}

.copilot-root .inspect-pane #copilot-inject-console-dock #codeEditorOutputSplit {
    flex: 0 0 4px;
    height: 4px;
    min-height: 4px;
    cursor: ns-resize;
    background: var(--inspect-border, #30363d);
    touch-action: none;
}

.copilot-root .inspect-pane #copilot-inject-console-dock #codeEditorOutputSplit:hover,
.copilot-root .inspect-pane #copilot-inject-console-dock #codeEditorOutputSplit.codeEditorOutputSplit-active {
    background: var(--inspect-accent, #0e639c);
}

.copilot-root .inspect-pane #copilot-inject-console-dock #codeEditorOutput {
    flex: 0 0 auto;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

.copilot-root .inspect-pane #copilot-inject-console-dock .codeEditorOutputList {
    flex: 1 1 auto;
    min-height: 0;
}

/* 顶栏「注入代码」激活态与错误徽标 */
.copilot-root .inspect-pane .dev-panel #btnInsertCode {
    position: relative;
}

.copilot-root .inspect-pane .dev-panel #btnInsertCode.gi-btn-active {
    background: var(--inspect-accent, #0e639c) !important;
    color: #fff !important;
    border-color: var(--inspect-accent-hover, #1177bb) !important;
}

.copilot-root .inspect-pane .dev-panel #btnInsertCode .copilot-inject-btn-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    border-radius: 7px;
    background: var(--modal-danger, #da3633);
    color: #fff;
    font-size: 9px;
    line-height: 14px;
    text-align: center;
    pointer-events: none;
}

.copilot-root .inspect-pane .gi-dev-toast {
    z-index: 10002;
}
