/* video-row.css
   One video listing row: thumbnail on the left, title, meta and description on the right.
   Used by the home page featured card and the video list. Needs theme.css. */

.nw { white-space: nowrap; } /* keeps a star attached to the last word of a wrapped title */

.video-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.video-row-link { color: inherit; text-decoration: none; border-radius: 6px; transition: background-color 150ms ease; }
.video-row-link:hover, .video-row-link:focus-visible { background-color: var(--hover-gold); }
.video-row-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.video-preview { position: relative; display: block; width: 132px; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid rgba(214, 226, 255, .18); border-radius: 8px; background: #111a29; margin-top: 5px; }
.video-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-row-link:hover .video-preview, .video-row-link:focus-visible .video-preview { border-color: rgba(132, 200, 237, .75); }
.video-copy { min-width: 0; }

/* Title on the left, publish date at the top right. On a phone the date moves to the meta line. */
.video-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.video-title { display: block; margin: 0; font-size: 16px; line-height: 1.35; transition: color 150ms ease; }
.video-head .video-title { flex: 1 1 auto; min-width: 0; }
.video-row-link .video-title:hover { color: var(--orange); }
.video-star { margin-left: 6px; color: var(--orange); font-size: .8em; vertical-align: 1px; }
.video-date { color: var(--muted); white-space: nowrap; }
.video-date-top { flex: 0 0 auto; font-size: 12px; }
.video-date-meta { display: none; margin-left: auto; }
.video-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.video-category { color: var(--blue); }
.video-topics { color: var(--muted); }
.video-description { display: block; margin: 8px 0 0; color: #c2ccda; font-size: 12px; line-height: 1.5; }

@media (max-width: 560px) {
  .video-row { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; padding: 11px 2px; }
  .video-preview { width: 82px; }
  .video-title { font-size: 14px; }
  .video-meta, .video-description { font-size: 10px; }
  .video-date-top { display: none; }
  /* Group on the left and the date at the far right of one line, then the topics on a single line below */
  .video-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "group date" "topics topics"; gap: 2px 10px; }
  .video-category { grid-area: group; }
  .video-date-meta { display: block; grid-area: date; justify-self: end; margin-left: 0; }
  .video-topics { grid-area: topics; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 380px) {
  .video-row { grid-template-columns: 61px minmax(0, 1fr); gap: 9px; }
  .video-preview { width: 61px; }
  .video-title { font-size: 12px; }
}
