/* =============================================
   数值千位分隔符移除工具 - 样式
   ============================================= */

/* 分隔符类型选择区域 */
.ntr-section {
    margin-bottom: 20px;
    background: #f8faff;
    border: 1px solid #e6eeff;
    border-radius: 10px;
    padding: 14px 16px;
}

.ntr-label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    display: block;
    margin-bottom: 10px;
}

.ntr-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ntr-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid #d9d9d9;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    user-select: none;
}

.ntr-radio:hover {
    border-color: #4096ff;
    background: #e6f4ff;
    color: #1677ff;
}

.ntr-radio input[type="radio"] {
    accent-color: #1677ff;
    cursor: pointer;
}

.ntr-radio input[type="radio"]:checked + span {
    color: #1677ff;
    font-weight: 600;
}

.ntr-radio:has(input[type="radio"]:checked) {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
}

.ntr-radio code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
}

/* 双列主操作区 */
.ntr-main {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ntr-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ntr-panel--input {
    border-top: 3px solid #4096ff;
}

.ntr-panel--output {
    border-top: 3px solid #52c41a;
}

.ntr-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 32px;
}

.ntr-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.ntr-panel-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 文本域 */
.ntr-textarea {
    width: 100%;
    min-height: 260px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.75;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #333;
    background: #fdfdfd;
}

.ntr-textarea:focus {
    outline: none;
    border-color: #4096ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
}

.ntr-textarea[readonly] {
    background: #f7f9fc;
    color: #1a1a2e;
    cursor: default;
}

/* 文本域底部统计行 */
.ntr-footer-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    min-height: 20px;
}

.ntr-counter {
    font-size: 12px;
    color: #999;
}

.ntr-counter strong {
    color: #1677ff;
    font-weight: 600;
}

/* 中间箭头列 */
.ntr-arrow-col {
    display: flex;
    align-items: center;
    padding-top: 46px;
    flex-shrink: 0;
}

.ntr-arrow {
    font-size: 28px;
    color: #d0d0d0;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
    display: block;
}

.ntr-arrow.active {
    color: #1677ff;
    transform: scale(1.15);
}

/* 快捷键提示 */
.ntr-shortcut-tip {
    font-size: 12px;
    color: #aaa;
    margin-left: 10px;
    vertical-align: middle;
}

/* 对比视图 */
.ntr-compare {
    margin-top: 20px;
    display: none;
}

.ntr-compare--visible {
    display: block;
    animation: ntr-fade-in 0.25s ease;
}

@keyframes ntr-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ntr-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.ntr-compare-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.ntr-compare-summary {
    font-size: 13px;
    color: #666;
}

.ntr-compare-summary strong {
    color: #1677ff;
}

.ntr-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.ntr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ntr-table th {
    background: #f5f7fa;
    padding: 9px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.ntr-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Consolas', 'Monaco', monospace;
    word-break: break-all;
}

.ntr-table tr:last-child td {
    border-bottom: none;
}

.ntr-table tr:hover td {
    background: #f0f7ff;
}

.ntr-table tr.ntr-row-changed td {
    background: #f6ffed;
}

.ntr-table tr.ntr-row-changed:hover td {
    background: #d9f7be;
}

.ntr-col-no {
    width: 44px;
    text-align: center;
    color: #aaa;
}

.ntr-col-count {
    width: 90px;
    text-align: center;
}

.ntr-col-action {
    width: 70px;
    text-align: center;
}

/* 对比表处理结果列 */
.ntr-col-result {
    color: #595959;
}

.ntr-col-result--changed {
    color: #389e0d;
    font-weight: 600;
}

.ntr-removed-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.ntr-removed-badge.has-removed {
    background: #e6f4ff;
    color: #1677ff;
}

.ntr-removed-badge.no-change {
    background: #f5f5f5;
    color: #999;
}

.ntr-copy-row-btn {
    padding: 3px 10px;
    font-size: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ntr-copy-row-btn:hover {
    border-color: #4096ff;
    color: #1677ff;
    background: #e6f4ff;
}

.ntr-copy-row-btn.copied {
    border-color: #52c41a;
    color: #52c41a;
    background: #f6ffed;
}

/* 复制全部按钮 - 已复制状态 */
button.ntr-btn-copied {
    border-color: #52c41a;
    color: #52c41a;
    background: #f6ffed;
}

/* Toast 通知 */
.ntr-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.ntr-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ntr-toast--success {
    background: rgba(82, 196, 26, 0.92);
}

.ntr-toast--warning {
    background: rgba(250, 173, 20, 0.92);
    color: #333;
}

.ntr-toast--error {
    background: rgba(255, 77, 79, 0.92);
}

/* 剪贴板降级辅助元素 */
.ntr-clipboard-tmp {
    position: fixed;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .ntr-main {
        flex-direction: column;
    }

    .ntr-arrow-col {
        padding-top: 0;
        justify-content: center;
    }

    .ntr-arrow {
        transform: rotate(90deg);
    }

    /* 移动端激活状态：保持旋转，叠加缩放 */
    .ntr-arrow.active {
        transform: rotate(90deg) scale(1.15);
    }

    .ntr-radio-group {
        gap: 8px;
    }

    .ntr-compare-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ntr-table td,
    .ntr-table th {
        padding: 7px 10px;
        font-size: 12px;
    }

    .ntr-col-action {
        display: none;
    }

    .ntr-footer-bar {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }
}
