.header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0.625rem 1rem;
  border-bottom: 1px solid var(--pds-color-border-default, oklch(0.925 0 0));
}

/* PDS badge styles never reach the canvas iframe (see P1App's canvas isolation
 * note), so the badges carry their own look, with a fallback on every token. */
.subject {
  display: inline-flex;
  flex-shrink: 1;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  padding: 0.1875rem 0.5rem 0.1875rem 0.375rem;
  background: var(--pds-color-badge-silver-muted-background, oklch(0.943 0 0));
  color: var(--pds-color-badge-silver-muted-foreground, oklch(0.3211 0 0));
  border-radius: 0.375rem;
  font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: var(--pds-typography-fw-semibold, 600);
  line-height: 1.25;
  white-space: nowrap;
}

/* PDS Badge wraps its label in an inner span, so the flex layout has to live there. */
.subject > span,
.resolved > span {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  min-width: 0;
}

.subject svg {
  flex-shrink: 0;
  width: 0.6875rem;
  height: 0.6875rem;
}

.resolved svg {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
}

.subjectLabel {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resolved {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  height: 1.25rem;
  padding-inline: 0.5rem;
  background: var(--pds-color-badge-success-muted-background, oklch(0.8896 0.0468 134.36));
  color: var(--pds-color-badge-success-muted-foreground, oklch(0.2998 0.0893 136.08));
  border-radius: var(--pds-border-radius-default, 0.25rem);
  font-size: 0.75rem;
  font-weight: var(--pds-typography-fw-medium, 500);
  line-height: 1;
  white-space: nowrap;
}

/* The PDS subtle button at size s, restated because its stylesheet is not in the canvas. */
.resolve {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: var(--pds-spacing-2xs, 0.5rem);
  height: var(--pds-spacing-button-height-s, 2rem);
  padding-block: 0;
  padding-inline: var(--pds-spacing-button-padding-inline-s, 1rem);
  background: var(--pds-color-button-subtle-background-default, rgb(0 0 0 / 5.5%));
  border: var(--pds-border-width-default, 1px) solid transparent;
  border-radius: var(--pds-border-radius-button, 3.5rem);
  color: var(--pds-color-button-subtle-foreground, oklch(0.2178 0 0));
  font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
  font-size: var(--pds-typography-size-s, 0.875rem);
  font-weight: var(--pds-typography-fw-medium, 500);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.resolve svg {
  flex-shrink: 0;
  width: var(--pds-typography-size-s, 0.875rem);
  height: var(--pds-typography-size-s, 0.875rem);
}

.resolve:hover:not(:disabled) {
  background: var(--pds-color-button-subtle-background-hover, rgb(0 0 0 / 8.25%));
}

.resolve:disabled {
  opacity: 0.6;
  cursor: default;
}

.spacer {
  flex: 1;
}

.close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--pds-border-radius-default, 0.25rem);
  color: var(--pds-color-foreground-default, oklch(0.2178 0 0));
  cursor: pointer;
}

.close:hover {
  background: var(--pds-color-surface-default-hover, oklch(0.9761 0 0));
}
