/* static/css/json_diff.css */

.tabs-container {
    width: 100%;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    background-color: #f0f0f0;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #4299e1;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.coming-soon {
    text-align: center;
    padding: 50px;
    color: #666;
}

.diff-result-container {
    margin-top: 20px;
    width: 100%;
}

.diff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.diff-stats {
    font-size: 14px;
    color: #666;
}

.diff-result-content {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  background-color: #f9f9f9;
  min-height: 100px;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.5;
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: pre;
  tab-size: 2;
}

.diff-result-content pre {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
}

/* JSON Diff 容器样式 */
.json-diff-container {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre;
  margin: 0;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 4px;
  overflow-x: auto;
  color: #000000;
}

.json-diff-container pre {
  margin: 0;
  color: #000000;
}

/* 差异状态样式 */
.json-diff-added {
  color: #22863a; /* 深绿色 */
  background-color: rgba(46, 160, 67, 0.15);
  padding: 0 2px;
  border-radius: 2px;
}

.json-diff-removed {
  color: #cb2431; /* 深红色 */
  background-color: rgba(203, 36, 49, 0.15);
  padding: 0 2px;
  border-radius: 2px;
  text-decoration: line-through;
}

.json-diff-updated {
  color: #b08800; /* 橙色/棕色 */
  background-color: rgba(245, 193, 55, 0.15);
  padding: 0 2px;
  border-radius: 2px;
}

/* exeFrequence 特殊样式 */
.exe-frequence-old {
  background-color: rgba(203, 36, 49, 0.2); /* 淡红色背景 */
  color: #cb2431; /* 深红色字体 */
  padding: 1px 4px;
  border-radius: 2px;
}

.exe-frequence-new {
  background-color: rgba(46, 160, 67, 0.2); /* 淡绿色背景 */
  color: #22863a; /* 深绿色字体 */
  padding: 1px 4px;
  border-radius: 2px;
}

/* 未变化的值 */
.json-diff-unchanged {
  color: #6c757d;
  opacity: 0.8;
}

/* JSON 键名样式 */
.json-diff-key {
  color: #881391; /* 紫色，更像 JSON 语法高亮 */
  font-weight: normal;
}

/* JSON 值样式 */
.json-diff-value {
  color: #1a1aa6; /* 深蓝色 */
}

/* 差异标记（+、-、~）的样式 */
.json-diff-container .json-diff-key {
  color: #881391;
}

.json-diff-container .json-diff-key:not([class*="json-diff-"]) {
  color: #881391 !important;
}

/* 从json_tools.html复制的样式 */
.top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.format-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.format-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.format-options input[type="number"] {
    width: 60px;
    padding: 3px 5px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons .ant-btn {
    padding: 6px 12px;
    height: auto;
}

.io-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
}

.input-section label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.input-section textarea {
    width: 100%;
    min-height: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: monospace;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .io-container {
        grid-template-columns: 1fr;
    }

    .top-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

/* JSON 验证状态样式 */
#old-json.json-valid,
#new-json.json-valid {
  border-color: #52c41a !important;
  box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.2) !important;
}

#old-json.json-invalid,
#new-json.json-invalid {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2) !important;
}

.validation-message {
  font-size: 12px;
  margin-top: 4px;
}

.validation-error {
  color: #ff4d4f;
}

.validation-success {
  color: #52c41a;
}