/*
 * Document Card component -- production styles.
 *
 * Per Product Design System §5.7:
 *   - Desktop: grid of 2 columns within the reading column (or single
 *     column if descriptions are long -- a content-dependent judgement
 *     left to the composing page's grid container, not this card).
 *   - Tablet: single column.
 *   - Mobile: single column, full width.
 * This component only styles ONE card; the grid/column layout is the
 * composing page/container's responsibility (per the "consistent card
 * width regardless of value length" pattern already established for
 * Key Facts) -- so there is no @media rule here for column count, only
 * internal spacing, which does not differ by breakpoint.
 *
 * Structural spacing references only the resolved Stage 2 spacing
 * tokens and the resolved radius token. Colour remains pending-design-
 * signoff -- no colour value is set below.
 */

@import url("../../config/tokens/tokens.generated.css");

.sr-document-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-m);
  border-radius: var(--radius-medium);
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-low);
  background: var(--color-surface);
  box-sizing: border-box;
  width: 100%;
  font-family: var(--font-family-body);
  color: var(--color-text-primary);
}

.sr-document-card__preview-label {
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--font-caption-size);
  color: var(--color-primary);
}

.sr-document-card__name {
  margin: 0;
  word-break: break-word;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-body-size);
}

.sr-document-card__purpose {
  margin: 0;
  word-break: break-word;
  color: var(--color-text-secondary);
  font-size: var(--font-caption-size);
}

.sr-document-card__requirement-label {
  display: inline-block;
  font-size: var(--font-caption-size);
  font-weight: var(--font-weight-semibold);
  align-self: flex-start;
  padding: 2px var(--space-s);
  border-radius: var(--radius-large);
  background: var(--color-primary-light);
  color: var(--color-primary);
  /* Text label always present alongside colour -- never colour alone,
     per §5.7's explicit rule against colour-only required/optional
     signalling. */
}

.sr-document-card__metadata {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-s);
  row-gap: var(--space-xs);
  font-size: var(--font-caption-size);
}

.sr-document-card__metadata dt {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.sr-document-card__metadata dd {
  margin: 0;
  word-break: break-word;
  color: var(--color-text-secondary);
}

.sr-document-card__notes {
  margin: 0;
  font-size: var(--font-caption-size);
  word-break: break-word;
  color: var(--color-muted);
}

.sr-document-card__checked-indicator {
  font-size: var(--font-caption-size);
  font-weight: var(--font-weight-semibold);
  color: var(--color-success);
}

.sr-document-card__download {
  align-self: flex-start;
  min-height: 44px; /* touch target */
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  text-decoration: underline;
  color: var(--color-primary);
  font-size: var(--font-caption-size);
  transition: border-color var(--motion-functional-duration) var(--motion-functional-easing);
}

.sr-document-card__download:hover {
  border-color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  .sr-document-card__download {
    transition: none;
  }
}
