/* ============================================
   DIFF CHECKER - TOOL-SPECIFIC STYLES
   Common styles loaded from /shared/styles/common.css
   ============================================ */

/* ============================================
   CONTAINER FLUID
   ============================================ */

.container-fluid {
    max-width: 100%;
    padding: 0 var(--space-4);
}

/* ============================================
   COMPARE SECTION
   ============================================ */

.compare-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.options {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   DIFF GRID
   ============================================ */

.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

@media (max-width: 1024px) {
    .diff-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DIFF PANEL
   ============================================ */

.diff-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.line-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.diff-textarea {
    flex: 1;
    min-height: 400px;
    padding: var(--space-4);
    background: var(--bg-card);
    border: none;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.diff-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ============================================
   RESULTS SECTION
   ============================================ */

.results-section {
    margin-top: var(--space-6);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.results-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.stats {
    display: flex;
    gap: var(--space-2);
}

.stat-badge {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-base);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.stat-badge.added {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.stat-badge.removed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.stat-badge.unchanged {
    background: var(--bg-card);
    color: var(--text-secondary);
}

/* ============================================
   DIFF OUTPUT
   ============================================ */

.diff-output {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    overflow-x: auto;
}

.diff-line {
    padding: 2px var(--space-2);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.diff-line.added {
    background: rgba(16, 185, 129, 0.2);
    color: var(--text-primary);
}

.diff-line.removed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--text-primary);
}

.diff-line.unchanged {
    color: var(--text-secondary);
}

.diff-line-number {
    display: inline-block;
    width: 40px;
    color: var(--text-secondary);
    user-select: none;
}

/* ============================================
   LEGEND
   ============================================ */

.legend-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: var(--space-1);
    vertical-align: middle;
}

.legend-box.added {
    background: rgba(16, 185, 129, 0.3);
}

.legend-box.removed {
    background: rgba(239, 68, 68, 0.3);
}

.legend-box.unchanged {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: none;
    border-radius: var(--radius-base);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary-500);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-large {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.125rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    
    .stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section {
    animation: fadeIn 0.3s ease;
}

