/**
 * @file
 * Linked video card: video-thumbnail, topic badge, title, author/date.
 *
 * Topic colours are the design palette, keyed by the topic's short URL. A
 * topic without an entry gets the neutral grey badge.
 */

.rn-video-card {
  --rn-topic: #686868;
  --rn-topic-bg: rgba(104, 104, 104, 0.1);

  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rn-video-card[data-topic="psa"] {
  --rn-topic: #0d9373;
  --rn-topic-bg: rgba(13, 147, 115, 0.1);
}

.rn-video-card[data-topic="ra-inflammatory-arthritis"] {
  --rn-topic: #d15d04;
  --rn-topic-bg: rgba(209, 93, 4, 0.1);
}

.rn-video-card[data-topic="autoimmune-lupus"] {
  --rn-topic: #a6436a;
  --rn-topic-bg: rgba(166, 67, 106, 0.1);
}

.rn-video-card[data-topic="car-t"] {
  --rn-topic: #0891b2;
  --rn-topic-bg: rgba(8, 145, 178, 0.1);
}

/* Thumbnail: the video-thumbnail component; the card is its hover host. */

.rn-video-card__media {
  display: block;
}

/* Text ------------------------------------------------------------------ */

.rn-video-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.rn-video-card__topic {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 6px;
  background: var(--rn-topic-bg);
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--rn-topic);
  white-space: nowrap;
}

/*
 * custom.css forces Poppins and weight 500 on every h1-h6 with !important, so
 * the design's Inter Bold needs !important too.
 */
.rn-video-card__title {
  margin: 0;
  font-family: Inter, sans-serif !important;
  font-size: 16px;
  line-height: 19.6px;
  font-weight: 700 !important;
  color: #121212;
  word-break: break-word;
}

/* Doubled class outranks the theme's global a:hover / a:focus colour. */
.rn-video-card .rn-video-card__title a,
.rn-video-card .rn-video-card__title a:hover,
.rn-video-card .rn-video-card__title a:focus {
  color: inherit;
  text-decoration: none;
}

.rn-video-card .rn-video-card__title a:hover,
.rn-video-card .rn-video-card__title a:focus-visible {
  text-decoration: underline;
}

.rn-video-card__meta {
  margin: 0;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-style: italic;
  font-weight: 400;
  color: #686868;
}
