/* stylelint-disable no-descending-specificity -- rules grouped by component+state */

/* See ./awards.md for design notes and rationale. */

.awards {
  --awards-gap: var(--ll-space-12);
  --awards-duration: 40s;

  padding-block: var(--ll-space-9);
  background: var(--ll-color-bg-default);
}

.awards__title {
  /* margin-block only: `is-fluid-width` owns margin-inline auto-centring. */
  margin-block: 0 var(--ll-space-8);
  color: var(--ll-color-text-secondary);
  font-family: var(--ll-text-h5-family);
  font-size: var(--ll-text-h5-size);
  line-height: var(--ll-text-h5-line-height);
  letter-spacing: var(--ll-text-h5-letter-spacing);
  font-weight: var(--ll-text-h5-weight);
  text-align: center;
}

.awards__marquee {
  overflow: hidden;
}

.awards__track {
  display: flex;
  align-items: center;
  gap: var(--awards-gap);
  width: max-content;
  margin: 0;
  padding-block: 0;
  padding-inline: 0 var(--awards-gap);
  list-style: none;
  animation: awards-scroll var(--awards-duration) linear infinite;
}

.awards__marquee[data-pause-on-hover='true']:hover .awards__track {
  animation-play-state: paused;
}

@keyframes awards-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-100% / 3), 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .awards__marquee {
    overflow-x: auto;
  }

  .awards__track {
    animation: none;
  }
}

.awards__item {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: var(--ll-space-4);
  margin: 0;
  padding: 0;
  color: var(--ll-color-text-secondary);
}

.awards__media,
.awards__media > picture,
.awards__media > picture > img {
  display: block;
}

.awards__media > picture > img {
  width: auto;
  height: 80px;
  object-fit: contain;
}

.awards__caption {
  margin: 0;
  color: var(--ll-color-text-secondary);
  font-family: var(--ll-text-body-sm-family);
  font-size: var(--ll-text-body-sm-size);
  line-height: var(--ll-text-body-sm-line-height);
  letter-spacing: var(--ll-text-body-sm-letter-spacing);
  font-weight: var(--ll-text-body-sm-weight);
  text-align: center;
}

.awards__item--no-text {
  /* BEM hook reserved for future image-only-entry modifier rules. */
}

.awards__item--hidden {
  display: none;
}

.awards__item--pending {
  visibility: hidden;
}

.awards__media--trustpilot .awards__trustpilot-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ll-space-3);
  color: inherit;
  text-decoration: none;
}

.awards__trustpilot-logo {
  display: block;
  width: auto;
  max-width: 130px;
  height: 24px;
  object-fit: contain;
}

.awards__trustpilot-stars {
  display: block;
  width: auto;
  max-width: 200px;
  height: 31px;
  object-fit: contain;
}

.awards__trustpilot-score {
  margin: 0;
  color: var(--ll-color-text-secondary);
  font-family: var(--ll-text-body-sm-family);
  font-size: var(--ll-text-body-sm-size);
  line-height: var(--ll-text-body-sm-line-height);
  letter-spacing: var(--ll-text-body-sm-letter-spacing);
  font-weight: var(--ll-text-body-sm-weight);
  text-align: center;
}

.awards__trustpilot-score b {
  font-weight: 700;
}

@media (width >= 768px) {
  .awards {
    --awards-gap: var(--ll-space-20);

    padding-block: var(--ll-space-12);
  }

  .awards__title {
    margin-block-end: var(--ll-space-12);
    font-family: var(--ll-text-h3-family);
    font-size: var(--ll-text-h3-size);
    line-height: var(--ll-text-h3-line-height);
    letter-spacing: var(--ll-text-h3-letter-spacing);
    font-weight: var(--ll-text-h3-weight);
  }

  .awards__media > picture > img {
    height: auto;
  }
}
