/**
 * @file
 * Full video page (node--video.html.twig): title, byline and share row,
 * player, caption, then transcription / recommended videos / comments
 * sections under a shared section heading.
 *
 * Everything is scoped to .rn-video-node: the transcription field and share
 * buttons are shared with podcasts and articles, which keep their own look.
 */

/* Intro ----------------------------------------------------------------- */

.rn-video-node__title-row {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

/*
 * Outranks custom.css's `.path-node article.node-detail h1`, which sets the
 * weight with !important.
 */
.path-node article.rn-video-node h1.rn-video-node__title {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-family: Poppins, sans-serif;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600 !important;
  color: #1a1a1a;
  word-break: break-word;
}

.rn-video-node__save {
  flex: 0 0 auto;
  padding-top: 4px;
}

/* Grey until saved; the saved state (.action-unflag) keeps the theme's blue. */
.rn-video-node__save a,
.rn-video-node__save .flag a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #7f7f7f;
  text-decoration: none;
}

.rn-video-node__save a:hover,
.rn-video-node__save a:focus-visible {
  color: #121212;
}

.rn-video-node__save .fa-star {
  font-size: 16px;
}

.rn-video-node__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 12px;
}

.rn-video-node__byline {
  margin: 0;
  padding: 1px 0;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 21px;
  font-style: italic;
  font-weight: 400;
  color: #6b7280;
}

/* Share buttons: the existing square brand icons, at the design's size. */
.rn-video-node__meta .block-social-sharing-buttons-block {
  margin: 0;
  padding: 0;
}

/* The block class outranks custom.css's 1em top margin on this row. */
.rn-video-node__meta .block-social-sharing-buttons-block .social-sharing-buttons {
  gap: 8px;
  margin: 0;
}

.rn-video-node__meta .social-sharing-buttons__button {
  margin: 0;
}

.rn-video-node__meta .social-sharing-buttons__button svg {
  width: 24px;
  height: 24px;
  border-radius: 2px;
}

.rn-video-node__player {
  padding-top: 12px;
}

.rn-video-node__caption {
  padding-top: 16px;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  color: #424242;
}

.rn-video-node__caption .field,
.rn-video-node__caption p {
  margin: 0;
  font: inherit;
  color: inherit;
}

.rn-video-node__caption .field + .field {
  margin-top: 8px;
}

/* Sections -------------------------------------------------------------- */

.rn-video-node__section {
  margin-top: 64px;
}

/*
 * Section heading. The transcription field's own label and the interactive
 * transcript's title take the same look, so their markup stays their own.
 */
.rn-video-node .rn-video-node__section-title,
.rn-video-node .rn-video-node__transcription .field__label,
.rn-video-node .rn-video-node__transcription .rn-transcript__title {
  margin: 0 0 24px;
  padding: 0 0 4px;
  border-bottom: 1px solid #dedede;
  font-family: Inter, sans-serif !important;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700 !important;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: #686868;
}

.rn-video-node .rn-video-node__section-title::before,
.rn-video-node .rn-video-node__section-title::after {
  content: none;
}

/* Transcription ----------------------------------------------------------- */

/* Drop the boxed podcast treatment from rheumnow_transcription.css. */
.rn-video-node .rn-video-node__transcription .field--name-field-transcription {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.rn-video-node .rn-video-node__transcription .field__label {
  cursor: default;
}

.rn-video-node .rn-video-node__transcription .field__item,
.rn-video-node .rn-video-node__transcription .field__item p {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: #424242;
}

/*
 * Collapsed: five lines of text plus the "Read more" row. The JS animates
 * between this and the measured full height.
 */
.rn-video-node .rn-video-node__transcription .field__item {
  max-height: 150px;
  transition: max-height 450ms cubic-bezier(0.4, 0, 0.2, 1);
}

.rn-video-node .rn-video-node__transcription .rheumnow-transcription__clip::before {
  transition: opacity 300ms ease;
}

.rn-video-node .rn-video-node__transcription .is-expanded .field__item {
  max-height: 99999px;
  margin-top: 0;
}

.rn-video-node .rn-video-node__transcription .rheumnow-transcription__clip::before {
  height: 44px;
}

.rn-video-node .rn-video-node__transcription .rheumnow-transcription__toggle {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  margin-top: 8px;
  padding: 0;
}

.rn-video-node .rn-video-node__transcription .rheumnow-transcription__toggle-label {
  display: inline;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
  color: #1585fe;
}

.rn-video-node .rn-video-node__transcription .rheumnow-transcription__toggle::after {
  width: 20px;
  height: 20px;
  margin: 0;
  background-image: url(../images/chevron-down-blue.svg);
}

.rn-video-node .rn-video-node__transcription .rheumnow-transcription__toggle:hover .rheumnow-transcription__toggle-label,
.rn-video-node .rn-video-node__transcription .rheumnow-transcription__toggle:focus-visible .rheumnow-transcription__toggle-label {
  text-decoration: underline;
}

/*
 * Interactive transcript (timed lines): unboxed like the plain transcript
 * above, so whichever one a video gets sits the same way in the page.
 */
.rn-video-node .rn-video-node__transcription .rn-transcript {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

/* Recommended videos -------------------------------------------------- */

.rn-video-node__recommended .rn-video-card-grid {
  --rn-video-card-gap: 20px;
}

/* Comments -------------------------------------------------------------- */

.rn-video-node__comments .comment-msg {
  margin: 0;
  padding: 20px;
  border: 1px solid #dedede;
  border-left: 6px solid #1585fe;
  border-radius: 12px;
  background: #f6f6f6;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  line-height: 21px;
  font-weight: 600;
  color: #494949;
}

.rn-video-node__comments .comment-msg p {
  margin: 0;
  font: inherit;
  color: inherit;
}

.rn-video-node__comments .comment-msg a {
  color: #1585fe;
}

@media (max-width: 600px) {
  .rn-video-node__title-row {
    gap: 16px;
  }

  .rn-video-node__section {
    margin-top: 48px;
  }
}
