/**
 * @file
 * /videos listing: title + search header row, loader and loading states.
 *
 * The card grid itself is the video-card-grid component and carries its own
 * styles.
 */

/* Keeps the last row of cards (or the loader) clear of the footer. */
.rn-videos-page {
  padding-bottom: 64px;
}

.rn-videos-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ececec;
}

/*
 * The header area holds the view's <h2 class="content-page-title">. custom.css
 * sets its weight with !important and indents it on .path-videos.
 */
.rn-videos-page .rn-videos-page__title .content-page-title {
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
  font-size: 32px;
  line-height: 36px;
  font-weight: 600 !important;
  color: #121212;
  text-transform: none;
  border: 0;
}

.rn-videos-page .rn-videos-page__title .content-page-title::before,
.rn-videos-page .rn-videos-page__title .content-page-title::after {
  content: none;
}

/* Search ----------------------------------------------------------------- */

.rn-videos-page__search {
  flex: 0 1 340px;
  min-width: 0;
}

.rn-video-search,
.rn-video-search .form--inline,
.rn-video-search .js-form-item {
  margin: 0;
  padding: 0;
  float: none;
}

.rn-video-search .js-form-item {
  width: 100%;
}

/* Outranks template.css's .body-page input[type=...] padding. */
.rn-videos-page .rn-video-search .rn-video-search__input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 8px 16px 8px 46px;
  border: 1px solid #dedede;
  border-radius: 0;
  background: #fff url(../images/search-outlined.svg) 16px center / 20px 20px no-repeat;
  box-shadow: none;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: #121212;
  -webkit-appearance: none;
  appearance: none;
}

.rn-videos-page .rn-video-search .rn-video-search__input::placeholder {
  color: #686868;
  opacity: 1;
}

.rn-videos-page .rn-video-search .rn-video-search__input:focus {
  border-color: #686868;
  outline: none;
}

/* Loading states (videos-page.js) --------------------------------------- */

/* Search: dim the current results until the new ones replace them. */
.rn-videos-page .view-content {
  transition: opacity 200ms ease;
}

.rn-videos-page.is-searching .view-content {
  opacity: 0.4;
  pointer-events: none;
}

/*
 * Infinite scroll: the spinner sits under the grid for as long as there is
 * another page, so it is already in view when the reader reaches the bottom.
 * videos-page.js removes it once the last page has loaded.
 */
.rn-videos-page__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .rn-videos-page .view-content {
    transition: none;
  }
}

.rn-videos-page__empty {
  margin: 0;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  color: #686868;
}

@media (max-width: 600px) {
  .rn-videos-page__search {
    flex-basis: 100%;
  }

  .rn-videos-page .rn-videos-page__title .content-page-title {
    font-size: 26px;
    line-height: 32px;
  }
}
