#text-diff .text-diff-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#text-diff textarea {
    display: block;
    width: 100%;
    min-height: 180px;
    margin-top: 8px;
    padding: 10px;
    resize: vertical;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font: 0.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#text-diff .text-diff-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

#text-diff .text-diff-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#text-diff input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}

#text-diff .text-diff-help {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

#text-diff-results > * + * {
    margin-top: 12px;
}

#text-diff .text-diff-scroll {
    max-height: var(--tool-output-max-height);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

#text-diff table {
    width: 100%;
    border-collapse: collapse;
    white-space: pre;
    color: var(--text-muted);
}

#text-diff th,
#text-diff td {
    padding: 4px 8px;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

#text-diff th {
    position: sticky;
    top: 0;
    background: var(--surface-hover);
    color: var(--text);
}

#text-diff td:nth-child(-n + 3) {
    width: 1%;
    text-align: right;
    user-select: none;
}

#text-diff .diff-added {
    color: var(--success);
    background: #3fb95012;
}

#text-diff .diff-removed {
    color: #ff8b8b;
    background: #ff8b8b12;
}

#text-diff-message.text-diff-error {
    color: #ff8b8b;
}

#text-diff textarea:focus-visible,
#text-diff input:focus-visible,
#text-diff button:focus-visible,
#text-diff .text-diff-scroll:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
