.diff-view {
  border-radius: 6px;
  overflow: hidden;
  background: var(--island-code-block-bg, var(--island-code-bg)) !important;
  border: 1px solid var(--island-code-border) !important;
}

.diff-view__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  border-bottom: 1px solid var(--island-code-border);
  gap: 8px;
}

.diff-view__filepath-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
  color: inherit;
}

.diff-view__chevron {
  color: var(--island-text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease-out;
}

.diff-view__chevron--open {
  transform: rotate(90deg);
}

.diff-view__filepath {
  font-family: var(--font-mono, 'SF Mono', monospace);
  font-size: 10.5px;
  color: var(--island-code-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diff-view__stats {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono, 'SF Mono', monospace);
  font-size: 10.5px;
  flex-shrink: 0;
}

.diff-view__stats-add {
  color: var(--island-success-text);
}

.diff-view__stats-remove {
  color: var(--island-danger-text);
}

.diff-view__lines {
  max-height: 200px;
  overflow-y: auto;
  font-family: var(--font-mono, 'SF Mono', monospace);
  font-size: 10.75px;
  font-weight: 540;
  line-height: 1.5;
}

/* Line rows */
.diff-view__line {
  display: flex;
  padding: 0 12px;
  white-space: pre;
  border-left: 2px solid transparent;
}

.diff-view__line--add {
  background: var(--island-success-bg);
  border-left-color: var(--island-success);
  color: var(--island-success-text);
}

.diff-view__line--remove {
  background: var(--island-danger-bg);
  border-left-color: var(--island-danger);
  color: var(--island-danger-text);
}

.diff-view__line--context {
  color: var(--island-code-muted);
  border-left-color: transparent;
}

.diff-view__line-num {
  width: 32px;
  text-align: right;
  padding-right: 8px;
  color: var(--island-text-muted);
  flex-shrink: 0;
  opacity: 0.5;
  user-select: none;
}

.diff-view__line-prefix {
  width: 12px;
  flex-shrink: 0;
  user-select: none;
}

.diff-view__line-content {
  flex: 1;
  min-width: 0;
}

/* Expand button */
.diff-view__expand-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid var(--island-code-border);
  color: var(--island-code-muted);
  font-family: var(--font-mono, 'SF Mono', monospace);
  font-size: 10px;
  padding: 5px 12px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease-out,
    color 0.15s ease-out;
}

.diff-view__expand-btn:hover {
  background: var(--island-subtle);
  color: var(--island-code-text);
}
