/*
 * 文本对比工具样式
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
*/
.tool-privacy-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 14px;
    border: 1px solid #c9dbf7;
    border-radius: 999px;
    background: #f3f7ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
}
.tool-diff-section { padding: 48px 0 72px; background: #f7f9fc; }
.tool-diff-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
}
.tool-field { display: flex; align-items: center; gap: 10px; color: #334155; font-size: 14px; }
.tool-field select {
    min-width: 140px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d5e0ef;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
}
.tool-check { display: inline-flex; align-items: center; gap: 8px; color: #475569; font-size: 14px; }
.tool-check input { width: 16px; height: 16px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.tool-actions .btn,
.tool-actions .m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
}
.tool-actions .btn i { margin: 0; }
.tool-diff-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.tool-pane {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.tool-pane-label {
    color: #334155;
    font-size: 14px;
    font-weight: 650;
}
.tool-pane textarea {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
    color: #1e293b;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
}
.tool-pane textarea:focus {
    outline: none;
    border-color: #84a9e7;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.tool-diff-result-panel {
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.tool-diff-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5edf7;
    background: #f8fbff;
}
.tool-diff-result-head h2 {
    margin: 0;
    color: #1c2f4c;
    font-size: 18px;
    font-weight: 650;
}
.tool-diff-result-head h2::after { display: none; }
.tool-diff-result-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}
.tool-diff-result {
    max-height: 560px;
    overflow: auto;
    padding: 8px 0;
}
.diff-empty {
    padding: 48px 24px;
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}
.diff-line-view { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.diff-row {
    display: grid;
    grid-template-columns: 52px 52px minmax(0, 1fr);
    gap: 0;
    border-bottom: 1px solid #f1f5f9;
}
.diff-row:last-child { border-bottom: 0; }
.diff-gutter {
    padding: 6px 8px;
    border-right: 1px solid #eef2f7;
    color: #94a3b8;
    text-align: right;
    background: #fafbfd;
    user-select: none;
}
.diff-code {
    margin: 0;
    padding: 6px 14px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
    font: inherit;
}
.diff-row.is-add .diff-code,
.diff-row.is-add .diff-gutter { background: #ecfdf5; color: #047857; }
.diff-row.is-del .diff-code,
.diff-row.is-del .diff-gutter { background: #fef2f2; color: #b91c1c; }
.diff-row.is-change .diff-code,
.diff-row.is-change .diff-gutter { background: #fff7ed; color: #9a3412; }
.diff-line-view .diff-add,
.diff-line-view .diff-del {
    padding: 0 1px;
}
.diff-char-view {
    padding: 18px 20px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
}
.diff-eq { color: #334155; }
.diff-add {
    background: #bbf7d0;
    color: #065f46;
    border-radius: 2px;
}
.diff-del {
    background: #fecaca;
    color: #991b1b;
    text-decoration: line-through;
    border-radius: 2px;
}
.tool-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}
.tool-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #d9e3f1;
    border-radius: 10px;
    background: #fff;
}
.tool-feature-item i { flex-shrink: 0; margin-top: 3px; color: #2563eb; }
.tool-feature-item p {
    margin: 0;
    min-width: 0;
    color: #52627a;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.tool-seo-block {
    margin-top: 28px;
    padding: 24px 26px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
}
.tool-seo-block h2 {
    margin: 0 0 12px;
    color: #1c2f4c;
    font-size: 20px;
}
.tool-seo-block h2::after { display: none; }
.tool-seo-block p {
    margin: 0;
    color: #61728a;
    font-size: 15px;
    line-height: 1.9;
}

@media (max-width: 1023px) {
    .tool-diff-inputs { grid-template-columns: 1fr; }
    .tool-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-actions { margin-left: 0; width: 100%; }
}

@media (max-width: 767px) {
    .tool-diff-section { padding: 28px 0 48px; }
    .tool-pane textarea { min-height: 180px; }
    .tool-feature-grid { grid-template-columns: 1fr; }
    .diff-row { grid-template-columns: 36px 36px minmax(0, 1fr); }
    .diff-gutter { padding: 6px 4px; font-size: 11px; }
    .diff-code { padding: 6px 10px; font-size: 12px; }
}
