/*
 * Related Roadmaps component -- production styles.
 *
 * Per Product Design System §5.15: "Desktop: Row of 3-4 cards. Tablet:
 * 2 per row. Mobile: Horizontal scroll or stacked single column." This
 * file implements the STACKED SINGLE COLUMN option for mobile -- the
 * more conservative of the two explicitly approved alternatives (see
 * the module docstring in related-roadmaps.js for the full reasoning).
 *
 * Desktop uses auto-fit rather than a hardcoded "4", since the design
 * text describes a range (3-4), not a single fixed number -- within
 * the standard 760-820px reading column, minmax(240px, 1fr) typically
 * yields 3 columns, matching guidance without over-specifying a count
 * that might not fit if fewer items are supplied.
 *
 * 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-related-roadmaps {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.sr-related-roadmaps__item {
  width: 100%;
}

.sr-related-roadmaps__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-m);
  border-radius: var(--radius-medium);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text-primary);
  min-height: 44px; /* approved touch-target minimum */
  box-sizing: border-box;
  font-family: var(--font-family-body);
  transition: border-color var(--motion-functional-duration) var(--motion-functional-easing),
    transform var(--motion-functional-duration) var(--motion-functional-easing),
    box-shadow var(--motion-functional-duration) var(--motion-functional-easing);
}

.sr-related-roadmaps__link:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--elevation-medium);
}

.sr-related-roadmaps__title {
  word-break: break-word;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-body-size);
}

.sr-related-roadmaps__reason {
  word-break: break-word;
  color: var(--color-muted);
  font-size: var(--font-caption-size);
}

@media (prefers-reduced-motion: reduce) {
  .sr-related-roadmaps__link {
    transition: none;
  }
  .sr-related-roadmaps__link:hover {
    transform: none;
  }
}

/* --- Tablet: exactly 2 per row --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .sr-related-roadmaps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Desktop: typically 3-4 per row, via auto-fit, not a hardcoded count --- */
@media (min-width: 1024px) {
  .sr-related-roadmaps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
