/* 텍스트/코드 Diff 비교 페이지 전용 스타일 (공통 스타일은 tool-page.css / components.css 사용) */

.dc-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .dc-input-grid {
        grid-template-columns: 1fr;
    }
}

.dc-input-grid textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    tab-size: 4;
}

/* 옵션 바 */
.dc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    padding: 0.9rem 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.dc-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.dc-option select {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* 결과 헤더 + 뷰 토글 */
.dc-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dc-result-header h2 {
    margin-bottom: 0;
}

.dc-view-toggle {
    display: flex;
    gap: 0.4rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: 8px;
}

.dc-view-btn {
    padding: 0.4rem 0.9rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.dc-view-btn.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.dc-view-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 통계 바 */
.dc-stats-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dc-stat {
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.dc-stat-add { background: rgba(72, 187, 120, 0.15); color: #2f855a; }
.dc-stat-del { background: rgba(245, 101, 101, 0.15); color: #c53030; }
.dc-stat-mod { background: rgba(236, 201, 75, 0.2); color: #b7791f; }

.dc-truncated-notice {
    background: rgba(236, 201, 75, 0.15);
    color: #b7791f;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.dc-identical {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 결과 뷰 컨테이너 */
.dc-view-container {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: auto;
    max-height: 600px;
}

.dc-unified,
.dc-split-pane {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.dc-row {
    display: flex;
    white-space: pre-wrap;
    word-break: break-all;
}

.dc-row-equal { background: var(--bg-primary); }
.dc-row-del { background: rgba(245, 101, 101, 0.12); }
.dc-row-ins { background: rgba(72, 187, 120, 0.12); }
.dc-row-empty { background: var(--bg-tertiary); }

.dc-line-no {
    flex: 0 0 auto;
    width: 3rem;
    text-align: right;
    padding: 0.15rem 0.5rem;
    color: var(--text-tertiary);
    user-select: none;
    border-right: 1px solid var(--border-color);
}

.dc-symbol {
    flex: 0 0 auto;
    width: 1.5rem;
    text-align: center;
    padding: 0.15rem 0;
    color: var(--text-tertiary);
    user-select: none;
}

.dc-row-del .dc-symbol { color: #c53030; }
.dc-row-ins .dc-symbol { color: #2f855a; }

.dc-content {
    flex: 1 1 auto;
    padding: 0.15rem 0.75rem 0.15rem 0.25rem;
}

.dc-inline-del {
    background: rgba(245, 101, 101, 0.35);
    text-decoration: line-through;
    border-radius: 2px;
}

.dc-inline-ins {
    background: rgba(72, 187, 120, 0.35);
    border-radius: 2px;
}

/* 접힌 동일 구간 */
.dc-collapsed {
    background: var(--bg-tertiary);
}

.dc-collapsed-btn {
    width: 100%;
    text-align: left;
    padding: 0.4rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}

.dc-collapsed-btn:hover {
    color: var(--primary-color);
}

/* 좌우(스플릿) 뷰 */
.dc-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 600px;
}

.dc-split-half {
    overflow: auto;
    border-right: 1px solid var(--border-color);
}

.dc-split-half:last-child {
    border-right: none;
}

@media (max-width: 768px) {
    .dc-split-container {
        grid-template-columns: 1fr;
    }
    .dc-split-half {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 300px;
    }
}

/* 단어 단위 모드 결과(흐르는 텍스트) */
.dc-word-flow {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.9;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}
