/* BeXML 页面特定样式 */

/* XML语法高亮样式 */
#xml-input .ace_xml-attribute {
    color: #E6550D !important;
}

#xml-input .ace_xml-tag {
    color: #31708f !important;
}

#xml-input .ace_xml-pe {
    color: #8A6D3B !important;
}

/* XML树形视图节点样式 */
#xml-output .xml-element {
    color: #31708f !important;
}

#xml-output .xml-attribute {
    color: #E6550D !important;
}

#xml-output .xml-text {
    color: #3C763D !important;
}

#xml-output .xml-cdata {
    color: #8A6D3B !important;
    font-style: italic;
}

#xml-output .xml-comment {
    color: #777 !important;
    font-style: italic;
}

#xml-output .xml-declaration {
    color: #31708f !important;
    font-weight: bold;
}

/* 自定义XML树形视图 */
.xml-tree-view {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    padding: 10px;
    overflow: auto;
    height: 100%;
    width: 100%;
}

/* 树节点 */
.xml-node {
    margin: 2px 0;
    position: relative;
}

/* 树缩进 */
.xml-indent {
    margin-left: 20px;
    padding-left: 10px;
    border-left: 1px dotted rgba(255, 255, 255, 0.1);
}

/* 展开/折叠按钮 */
.xml-toggle {
    display: inline-block;
    width: 14px;
    height: 14px;
    text-align: center;
    line-height: 12px;
    font-size: 12px;
    color: var(--accent-color);
    cursor: pointer;
    margin-right: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    background-color: rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s;
}

.xml-toggle:hover {
    background-color: rgba(var(--accent-color-rgb), 0.1);
}

.xml-toggle-collapsed {
    transform: rotate(-90deg);
}

.xml-children {
    display: block;
}

.xml-children.collapsed {
    display: none;
}

.xml-tag {
    color: #31708f;
    font-weight: bold;
}

.xml-attr-name {
    color: #E6550D;
}

.xml-attr-value {
    color: #85a300;
}

.xml-text {
    color: #3C763D;
}

.xml-cdata {
    color: #8a6d3b;
    font-style: italic;
}

.xml-comment {
    color: #777777;
    font-style: italic;
}

.xml-pi {
    color: #6b399c;
    font-style: italic;
}

.whitespace-node {
    display: none;
}

/* XML验证结果提示 */
#xml-validation-toast {
    position: absolute;  /* bejson.css中使用absolute */
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
}

#xml-validation-toast.show {
    transform: translateX(-50%) translateY(0);
}

#xml-validation-toast.success {
    background-color: rgba(46, 204, 113, 0.95) !important;
    color: white !important;
}

#xml-validation-toast.error {
    background-color: rgba(231, 76, 60, 0.95) !important;
    color: white !important;
}

/* 添加警告提示样式 */
#xml-validation-toast.warning {
    background-color: rgba(243, 156, 18, 0.95) !important;
    color: white !important;
}

/* XML解析错误样式 */
.xml-parse-error {
    padding: 15px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

/* ACE 编辑器调整 */
.ace_editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* XML特定滚动条样式 */
#xml-input::-webkit-scrollbar,
#xml-output::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#xml-input::-webkit-scrollbar-track,
#xml-output::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.1);
    border-radius: 4px;
}

#xml-input::-webkit-scrollbar-thumb,
#xml-output::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.3);
    border-radius: 4px;
}

#xml-input::-webkit-scrollbar-thumb:hover,
#xml-output::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
} 