/* Diff view styles */
.diff-content {
    background: #fafafa;
}

.diff-content.unified {
    padding: 0;
}

.diff-code {
    margin: 0;
    padding: 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #fafafa;
}

.diff-line {
    display: flex;
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

.diff-line.line-removed {
    background: #ffebee;
}

.diff-line.line-added {
    background: #e8f5e9;
}

.diff-line.line-unchanged {
    background: transparent;
}

.diff-code .line-number {
    color: #999;
    user-select: none;
    margin-right: 10px;
    display: inline-block;
    text-align: right;
    flex-shrink: 0;
    padding-left: 10px;
    line-height: 1.3;
}

.diff-code .line-prefix {
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
    line-height: 1.3;
}

.diff-line.line-removed .line-prefix,
.diff-line.line-removed .line-content {
    color: #d32f2f;
}

.diff-line.line-added .line-prefix,
.diff-line.line-added .line-content {
    color: #388e3c;
}

.diff-line.line-unchanged .line-prefix,
.diff-line.line-unchanged .line-content {
    color: #666;
}

.diff-code .line-content {
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-right: 10px;
    line-height: 1.3;
}

/* Compact todo list styles */
.todo-compact {
    margin-top: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.85em;
}

.todo-compact-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.todo-compact-title {
    font-weight: 600;
    color: #495057;
}

.todo-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
}

.todo-stat.completed {
    background: #d4edda;
    color: #155724;
}

.todo-stat.in-progress {
    background: #fff3cd;
    color: #856404;
}

.todo-stat.pending {
    background: #e2e3e5;
    color: #383d41;
}

.todo-compact-items {
    margin-left: 20px;
}

.todo-compact-item {
    padding: 3px 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.todo-compact-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.todo-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.todo-priority-badge {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    border-radius: 2px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 4px;
}

.todo-priority-badge.high {
    background: #dc3545;
    color: white;
}

.todo-priority-badge.medium {
    background: #ffc107;
    color: #333;
}

/* Read tool display styles */
.read-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.read-header {
    background: #e9ecef;
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid #dee2e6;
}

.read-header .file-path {
    color: #0056b3;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.read-header .line-info {
    color: #6c757d;
    font-size: 0.8em;
    margin-left: 10px;
    font-weight: normal;
}

.read-content {
    background: #fafafa;
    padding: 0;
}

.read-code {
    margin: 0;
    padding: 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #fafafa;
    /* Ensure proper UTF-8 rendering */
    unicode-bidi: plaintext;
}

.read-line {
    display: flex;
    padding: 0;
    margin: 0;
    line-height: 1.4;
}

.read-line:hover {
    background: #f0f0f0;
}

.read-code .line-number {
    color: #999;
    user-select: none;
    margin-right: 15px;
    display: inline-block;
    text-align: right;
    width: 40px;
    flex-shrink: 0;
    align-self: flex-start;
    padding-left: 10px;
}

.read-code .line-content {
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-right: 10px;
}

/* Bash tool display styles */
.bash-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.bash-header {
    background: #e9ecef;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bash-header .terminal-icon {
    color: #0d6efd;
    font-size: 1.1em;
}

.bash-header .command-label {
    color: #495057;
    font-size: 0.9em;
    font-weight: 600;
}

.bash-header .description {
    color: #6c757d;
    font-size: 0.85em;
    margin-left: auto;
}

.bash-terminal {
    background: #f8f9fa;
    padding: 12px 16px;
    font-size: 0.9em;
    line-height: 1.4;
    color: #212529;
}

.bash-cwd {
    color: #6c757d;
    font-size: 0.85em;
    margin-bottom: 4px;
}

.bash-command-line {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.bash-prompt {
    color: #0d6efd;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.bash-command {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #212529;
    flex: 1;
}

.bash-output {
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.bash-timeout {
    color: #fd7e14;
    font-size: 0.8em;
    float: right;
    opacity: 0.7;
}

/* ANSI formatting styles */
.ansi-bold {
    font-weight: bold;
}

.ansi-italic {
    font-style: italic;
}

.ansi-underline {
    text-decoration: underline;
}

.ansi-strike {
    text-decoration: line-through;
}