.viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.viewer:focus {
  outline: none;
}

.content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  font-size: 13px;
}

.markdownBody {
  padding: 24px 32px 40px;
  max-width: 880px;
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
}

.markdownBody > :first-child {
  margin-top: 0;
}

.truncatedBanner {
  margin: 12px 16px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(var(--accent-primary-rgb), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  color: var(--text-muted);
  font-size: 12px;
}

/* Metadata chip for agent-managed files (plan / memory / …) shown in the
 * pane toolbar between the path and the view controls. */
.agentBadge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.12);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
}

.imageWrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  overflow: auto;
}

.image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Subtle border so transparent PNGs are still visible against the panel
   * background. */
  border: 1px solid var(--divider);
  border-radius: 4px;
}

.imageMeta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
