/* HTML 在线预览：左编辑 / 右预览 */
.tool-form-html-runner .hp-workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 640px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}
.tool-form-html-runner .hp-split {
    display: flex;
    gap: 12px;
    min-height: 520px;
    flex: 1;
}
.tool-form-html-runner .hp-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    flex: 1;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}
.tool-form-html-runner .hp-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #ececec;
}
.tool-form-html-runner .hp-panel-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.tool-form-html-runner .hp-panel-meta {
    font-size: 12px;
    color: #888;
}
.tool-form-html-runner .hp-editor-host {
    flex: 1;
    min-height: 320px;
    background: #fff;
}
.tool-form-html-runner #hp-editor,
.tool-form-html-runner .hp-editor-host .ace_editor {
    width: 100%;
    height: 100%;
    font-size: 14.8px !important;
    line-height: 20px !important;
}
.tool-form-html-runner #hp-editor .ace_gutter-cell,
.tool-form-html-runner .hp-editor-host .ace_gutter-cell {
    color: #6e6e6e;
    font-size: 0.925rem;
}

/* 与 HTML 格式化一致的着色，略压暗 */
.tool-form-html-runner .ace-monaco-vs-xml {
    color: #222 !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_line,
.tool-form-html-runner .ace-monaco-vs-xml .ace_text {
    color: #222 !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_meta.ace_tag.ace_tag-name,
.tool-form-html-runner .ace-monaco-vs-xml .ace_meta.ace_tag.ace_punctuation,
.tool-form-html-runner .ace-monaco-vs-xml .ace_paren {
    color: #6b0000 !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_entity.ace_attribute-name {
    color: #b80000 !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_string,
.tool-form-html-runner .ace-monaco-vs-xml .ace_keyword,
.tool-form-html-runner .ace-monaco-vs-xml .ace_constant.ace_language {
    color: #0000b8 !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_comment {
    color: #006000 !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_keyword.ace_operator {
    color: #1a1a1a !important;
}

/* 文本选中高亮 */
.tool-form-html-runner .ace-monaco-vs-xml .ace_marker-layer .ace_selection {
    background: #add6ff !important;
}
.tool-form-html-runner .ace-monaco-vs-xml .ace_marker-layer .ace_selected-word {
    border: 1px solid #add6ff !important;
    background: rgba(173, 214, 255, 0.35) !important;
}
.tool-form-html-runner .hp-iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff;
    min-height: 320px;
}
.tool-form-html-runner .hp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.tool-form-html-runner .hp-actions .btn {
    min-width: 0;
    margin-right: 0;
    padding: .35rem .55rem;
}
.tool-form-html-runner .hp-live-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #555;
    margin: 0 4px;
    cursor: pointer;
    user-select: none;
}
.tool-form-html-runner .hp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    font-size: 12px;
    color: #666;
}
.tool-form-html-runner .hp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d9d9d9;
}
.tool-form-html-runner .hp-status-dot.is-done { background: #52c41a; }
.tool-form-html-runner .hp-status-dot.is-error { background: #ff4d4f; }
.tool-form-html-runner .hp-status-dot.is-running { background: #1677ff; }
.tool-form-html-runner .hp-status-dot.is-idle { background: #d9d9d9; }
@media (max-width: 900px) {
    .tool-form-html-runner .hp-split { flex-direction: column; }
    .tool-form-html-runner .hp-editor-host,
    .tool-form-html-runner .hp-iframe { min-height: 280px; }
}
