/* Diff Checker Styles */
.diff-input-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.diff-input-group {
    display: flex;
    flex-direction: column;
}

.diff-input-group label {
    font-weight: 600;
    color: #2a4d8f;
    margin-bottom: 8px;
    font-size: 14px;
}

.diff-input-group textarea {
    width: 100%;
    min-height: 250px;
    padding: 12px;
    border: 1px solid #b0b8c1;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: #fff;
    transition: border-color 0.2s;
}

.diff-input-group textarea:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.diff-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.diff-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.diff-actions .btn-primary {
    background: linear-gradient(90deg, #2a4d8f 60%, #4f8cff 100%);
    color: #fff;
}

.diff-actions .btn-primary:hover {
    background: linear-gradient(90deg, #1a2d4f 60%, #2a4d8f 100%);
}

.diff-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.diff-actions .btn-secondary:hover {
    background: #545b62;
}

.no-diff {
    text-align: center;
    padding: 40px;
    color: #4f5d75;
    font-size: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 20px 0;
}

/* Diff container and header */
.diff-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.10);
    overflow: hidden;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.diff-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e7ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.diff-header h3 {
    margin: 0;
    color: #2a4d8f;
    font-size: 16px;
    font-weight: 600;
}

.diff-stats-inline {
    display: flex;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
}

.stat-added {
    color: #28a745;
}

.stat-deleted {
    color: #dc3545;
}

.stat-unchanged {
    color: #6c757d;
}

/* Diff table styles */
.diff-table-wrapper {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.diff-table th,
.diff-table td {
    padding: 4px 10px;
    vertical-align: top;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    border-bottom: 1px solid #e0e7ef;
}

.diff-table thead th {
    background: #f1f3f6;
    padding: 10px 15px;
    font-weight: 600;
    color: #2a4d8f;
    font-size: 13px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

.diff-table th.line-num,
.diff-table td.line-num {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    background: #f8fafc;
    color: #6c757d;
    text-align: right;
    user-select: none;
    border-right: 1px solid #e0e7ef;
}

.diff-table th.line-content,
.diff-table td.line-content {
    width: calc(50% - 50px);
}

/* Row type styles */
.diff-row.unchanged td {
    background-color: #fff;
}

.diff-row.added td.line-content:last-child {
    background-color: #e6ffed;
}

.diff-row.deleted td.line-content:nth-child(2) {
    background-color: #ffeef0;
}

.deleted-content {
    background-color: #ffeef0 !important;
    color: #b31d28;
}

.added-content {
    background-color: #e6ffed !important;
    color: #22863a;
}

.diff-marker {
    font-weight: bold;
    margin-right: 5px;
}

.deleted-content .diff-marker {
    color: #b31d28;
}

.added-content .diff-marker {
    color: #22863a;
}

/* Copy feedback toast */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .diff-input-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .diff-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .diff-actions button {
        width: 100%;
        max-width: 200px;
        padding: 14px 20px;
        font-size: 16px;
    }

    table.diff, .diff tbody, .diff tr, .diff td, .diff th {
        display: block;
    }

    .diff thead {
        display: none;
    }

    .diff tbody tr {
        border-bottom: 10px solid #eef;
        padding-bottom: 10px;
    }

    .diff tbody th {
        width: auto;
        border-right: none;
        border-bottom: 1px solid #e0e7ef;
        text-align: left;
        background: #f1f3f6;
    }

    .diff td {
        border: none;
    }
}
