/*
 文件名称：text-clean.css
 作者：wangkai（2026-11-24）
 创作时间：2026-11-24 23:20:00（北京时间）
 文件说明：文本清洗工具样式，包含规则分组、操作按钮、左右输入输出区与移动端适配
*/

/* 页面容器 */
.tc-page {
    max-width: 1290px;
    margin: 24px auto 40px;
    padding: 0 12px;
}

/* 主面板 */
.tc-card {
    background: #ffffff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(31, 45, 61, 0.06);
    padding: 24px;
}

.tc-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: #1f2d3d;
}

.tc-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: #7a869a;
    line-height: 1.6;
}

/* 规则分组 */
.tc-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.tc-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    background: #fbfcfe;
}

.tc-group__title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2d3d;
}

.tc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tc-field > label {
    font-size: 12px;
    color: #7a869a;
}

.tc-select {
    width: 100%;
    height: 34px;
    padding: 4px 10px;
    border: 1px solid #d5dbe8;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
    color: #1f2d3d;
    outline: none;
    cursor: pointer;
}

.tc-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tc-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #3f4a5a;
    cursor: pointer;
    user-select: none;
}

.tc-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

/* 操作区 */
.tc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.tc-btn {
    padding: 9px 18px;
    border: 1px solid #d5dbe8;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #1f2d3d;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.tc-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.tc-btn--primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.tc-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.tc-tip {
    font-size: 13px;
    color: #7a869a;
}

.tc-tip.is-ok {
    color: #16a34a;
}

.tc-tip.is-error {
    color: #dc2626;
}

/* 输入输出 */
.tc-io {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tc-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tc-label-row > label {
    font-size: 13px;
    color: #5a6678;
}

.tc-count {
    font-size: 12px;
    color: #9aa5b8;
}

.tc-textarea {
    width: 100%;
    height: 460px;
    padding: 12px 14px;
    border: 1px solid #d5dbe8;
    border-radius: 8px;
    outline: none;
    resize: vertical;
    font-size: 14px;
    line-height: 1.7;
    color: #1f2d3d;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tc-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tc-textarea--mono {
    background: #fbfcfe;
}

/* 移动端适配 */
@media (max-width: 900px) {
    .tc-card {
        padding: 16px;
    }

    .tc-io {
        grid-template-columns: 1fr;
    }

    .tc-textarea {
        height: 320px;
    }
}
