.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: var(--min-h-card);

  & + & {
    margin-top: var(--spacing-4);
  }
}

.header {
  padding: var(--spacing-5) var(--spacing-6) 0;

  h2 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-1);
  }
}

.titleSuffix {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-tertiary);
}

.description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-1);
}

.body {
  padding: var(--spacing-5) var(--spacing-6) var(--spacing-6);
}

.learnMore {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  text-decoration: none;
  margin-top: var(--spacing-2);
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;

  &:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
  }
}

.warningBanner {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-6);
  background-color: color-mix(in srgb, var(--color-accent) 8%, transparent);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-top: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);

  svg {
    flex-shrink: 0;
  }
}

.warningBannerInline {
  composes: warningBanner;
  margin: var(--spacing-4) calc(-1 * var(--spacing-6)) var(--spacing-4);
}

.infoBanner {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-6);
  background-color: color-mix(in srgb, var(--color-primary) 8%, transparent);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-top: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);

  svg {
    flex-shrink: 0;
  }
}

.collapsible {
  composes: card;

  summary {
    list-style: none;
    cursor: pointer;

    &::-webkit-details-marker {
      display: none;
    }
  }
}

.collapsibleHeader {
  composes: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding-bottom: var(--spacing-5);

  &:hover {
    opacity: 0.8;
  }
}

.chevron {
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  transition: transform 200ms ease;

  details[open] > summary & {
    transform: rotate(180deg);
  }
}

.infoBannerLink {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;

  &:hover {
    opacity: 0.8;
  }
}
