/* BeJSON 页面特定样式 */
.bejson-container {
    padding: 0;
    height: calc(100% - 10px);
}

.bejson-container .row {
    margin: 0;
}

.bejson-container .col-md-6 {
    padding: 5px;
}

/* JSON工具特有样式 */
.export-group {
    display: flex;
    align-items: center;
}

.export-label {
    margin-right: 5px;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* JSON编辑器基础样式 */
.jsoneditor-container {
    height: 100% !important;
}

#json-input, #json-output {
    width: 100%;
    height: 100% !important;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.card-body {
    position: relative;
}

.jsoneditor {
    border: none !important;
    height: 100% !important;
}

.jsoneditor-outer {
    height: 100%;
}

.ace_editor {
    height: 100% !important;
}

/* 恢复编辑器亮色主题 */
/* 菜单样式 */
.jsoneditor-menu {
    background-color: #3883fa !important;
    border-bottom: 1px solid #3883fa !important;
}

/* 代码编辑器容器 */
.ace-jsoneditor {
    height: 100% !important;
    background-color: #ffffff !important;
}

.ace-jsoneditor .ace_gutter {
    background-color: #f5f5f5 !important;
    color: #999 !important;
}

.ace-jsoneditor .ace_scroller {
    background-color: #ffffff !important;
}

.ace-jsoneditor .ace_text-layer {
    color: #4d4d4d !important;
}

.ace-jsoneditor .ace_variable {
    color: #1a1a1a !important;
}

/* 保持默认的字符串颜色 */
.ace-jsoneditor .ace_string {
    color: #006000 !important;
}

.ace-jsoneditor .ace_constant.ace_numeric {
    color: #ee422e !important;
}

.ace-jsoneditor .ace_keyword {
    color: #3883fa !important;
}

.ace-jsoneditor .ace_cursor {
    color: #333 !important;
}

.ace-jsoneditor .ace_active-line {
    background-color: rgba(0, 0, 0, 0.07) !important;
}

/* 树形容器 */
div.jsoneditor-tree {
    height: 100% !important;
    overflow: auto;
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

.jsoneditor-tree button {
    color: #1a1a1a !important;
}

.jsoneditor-tree table {
    margin: 0;
    border-collapse: collapse;
}

.jsoneditor-tree button.jsoneditor-expanded {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.jsoneditor-tree .jsoneditor-field {
    color: #1a1a1a !important;
}

.jsoneditor-tree .jsoneditor-value {
    color: #1a1a1a !important;
}

.jsoneditor-tree .jsoneditor-value.jsoneditor-string {
    color: #006000 !important;
}

.jsoneditor-tree .jsoneditor-value.jsoneditor-number {
    color: #ee422e !important;
}

.jsoneditor-tree .jsoneditor-value.jsoneditor-boolean {
    color: #3883fa !important;
}

.jsoneditor-tree .jsoneditor-value.jsoneditor-null {
    color: #7f8c8d !important;
}

#json-input .jsoneditor-mode-code,
#json-output .jsoneditor-mode-tree,
#json-output .jsoneditor-mode-view {
    width: 100% !important;
    height: 100% !important;
}

/* 验证结果提示条 */
.validation-toast {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

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

.validation-toast.success {
    background-color: var(--button-success);
    color: white;
}

.validation-toast.error {
    background-color: var(--button-danger);
    color: white;
}

/* 添加警告样式 */
.validation-toast.warning {
    background-color: #f39c12;
    color: white;
}

/* JSON解析错误样式 */
.json-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;
}

/* 工具容器样式 */
.tools-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tool-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 8px;
    margin-right: 3px;
}

.tool-group:last-child {
    border-right: none;
    padding-right: 0;
}

.card {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.btn {
    transition: all 0.2s ease;
    opacity: 0.9;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
    background-color: transparent;
}

.btn-outline-primary {
    border-color: var(--button-primary);
    color: var(--button-primary);
}

.btn-outline-secondary {
    border-color: var(--button-secondary);
    color: var(--button-secondary);
}

.btn-outline-danger {
    border-color: var(--button-danger);
    color: var(--button-danger);
}

.btn-outline-success {
    border-color: var(--button-success);
    color: var(--button-success);
}

.btn-outline-warning {
    border-color: var(--highlight-color);
    color: var(--highlight-color);
}

.btn-outline-info {
    border-color: var(--button-info);
    color: var(--button-info);
}

.btn-outline-primary:hover {
    background-color: var(--button-primary);
    color: white;
}

.btn-outline-secondary:hover {
    background-color: var(--button-secondary);
    color: white;
}

.btn-outline-danger:hover {
    background-color: var(--button-danger);
    color: white;
}

.btn-outline-success:hover {
    background-color: var(--button-success);
    color: white;
}

.btn-outline-warning:hover {
    background-color: var(--highlight-color);
    color: white;
}

.btn-outline-info:hover {
    background-color: var(--button-info);
    color: white;
}

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

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

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

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

/* 响应式适配 */
@media (max-width: 992px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header h2 {
        margin-bottom: 10px;
    }
    
    .tools-container {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .tool-group {
        white-space: nowrap;
        margin-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .tool-group {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 5px;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .tool-group:last-child {
        border-bottom: none;
    }
    
    .export-group {
        flex-wrap: wrap;
    }
    
    .export-label {
        width: 100%;
        margin-bottom: 5px;
    }
} 