/**
 * 文本对比工具
 * 页面外壳（顶部导航、居中容器、底部版权行）由 ../../tools-page.css 提供，
 * 本文件只保留该工具的专属样式。
 */

/* 代码 / 密文区域统一使用等宽字体，便于查看与复制 */
#otWorkspace textarea,
#otWorkspace pre,
#otWorkspace code {
    font-family: Consolas, Monaco, "Courier New", monospace;
}

/* 补齐页面使用到的自定义工具类 */

/* 细滚动条 */
.scrollbar-thin {
    scrollbar-width: thin;
}
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}
.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

/* 文本输入框与差异展示区使用统一的等宽字体和行高，保证两者观感一致、同步滚动对齐 */
#original-text,
#modified-text,
#original-diff,
#modified-diff {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* 空行在差异视图中也要保持行高，避免左右两侧内容错位 */
#original-diff > div,
#modified-diff > div {
    min-height: 1.6em;
}

/* 文本差异项 */
.text-shadow { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.transition-height { transition: max-height 0.3s ease-in-out; }
.diff-item {
    position: relative;
    padding-right: 50px;
}
.diff-merge-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.diff-item:hover .diff-merge-btn {
    opacity: 1;
}

/* 状态色：成功 / 警告 / 危险（页面用到，但 Tailwind 主题中未定义，这里补齐） */
.text-success { color: #52c41a; }
.text-warning { color: #faad14; }
.text-danger { color: #f53f3f; }
.bg-success { background-color: #52c41a; }
.bg-warning { background-color: #faad14; }
.bg-danger { background-color: #f53f3f; }
.border-success { border-color: #52c41a; }
.border-warning { border-color: #faad14; }
.border-danger { border-color: #f53f3f; }

/* 带透明度修饰符的工具类 */
[class~="bg-danger/20"] { background-color: rgba(245, 63, 63, 0.2); }
[class~="bg-success/20"] { background-color: rgba(82, 196, 26, 0.2); }
[class~="bg-warning/20"] { background-color: rgba(250, 173, 20, 0.2); }
[class~="bg-warning/10"] { background-color: rgba(250, 173, 20, 0.1); }
[class~="border-danger/30"] { border-color: rgba(245, 63, 63, 0.3); }
[class~="border-success/30"] { border-color: rgba(82, 196, 26, 0.3); }
[class~="border-warning/30"] { border-color: rgba(250, 173, 20, 0.3); }

/* 通用组件类补齐 */

/* 输入框聚焦态 */
.input-focus:focus {
    border-color: #0989E2;
    box-shadow: 0 0 0 2px rgba(9,137,226, 0.15);
    outline: none;
}
