/* Blog TRENDING box: includes/blog/trending.php (which posts),
   components/blog-trending.php (the HTML), document/modules/blog-trending.md.
   Two looks: the numbered list (blog list, category pages) and the picture
   cards (the bottom of a blog post). Loaded in the head of those pages, so the
   box never shows unstyled. Everything is scoped to .tgv-trending. */


/* SHARED: the line above the title and the number square */
.tgv-trending .right-content-border {
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin-bottom: 4px;
}
.tgv-trending .right-content-border-left {
  width: 69px;
  background: var(--primary);
}
.tgv-trending .right-trending-no {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid #fff;
  font-size: 12px;
  position: relative;
}
.tgv-trending .right-trending-no span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
/* SHARED END */


/* LIST: numbered titles (blog list, category pages) */
.tgv-trending--list .right-trending-container {
  gap: 20px;
  margin-bottom: 10px;
}
.tgv-trending--list .right-trending-link {
  width: calc(100% - 50px);
  color: inherit;
  text-decoration: none;
}
.tgv-trending--list .popular-blog-right-title {
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  margin-bottom: 0;
}
/* LIST END */


/* CARDS: picture cards (the bottom of a blog post), 4 in a row on a computer */
.tgv-trending-cards {
  display: flex;
  gap: 20px;
}
.tgv-trending-card {
  width: calc(25% - 15px);
  display: block;
  color: #fff;
  text-decoration: none;
}
.tgv-trending-pic {
  aspect-ratio: 1302 / 580; /* the blog's usual picture shape: shown whole */
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.tgv-trending-pic img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.tgv-trending-meta {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
}
.tgv-trending-words {
  min-width: 0;
}
.tgv-trending-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 2px;
}
.tgv-trending-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* CARDS END */


/* CARDS ON TABLETS AND PHONES: one row you swipe, kept inside the box, with a
   4 px bar under it (faint track, red part that moves) */
@media (max-width: 1024px) {
  .tgv-trending-cards {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 14px;
  }
  .tgv-trending-card {
    flex: 0 0 42%;
    scroll-snap-align: start;
  }
  .tgv-trending-cards::-webkit-scrollbar {
    height: 4px;
  }
  .tgv-trending-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
  }
  .tgv-trending-cards::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 999px;
  }
}
@media (max-width: 768px) {
  .tgv-trending-card {
    flex-basis: 82%;
  }
}
/* Firefox has no ::-webkit-scrollbar: its own thin bar, in the same colours */
@supports not selector(::-webkit-scrollbar) {
  @media (max-width: 1024px) {
    .tgv-trending-cards {
      scrollbar-width: thin;
      scrollbar-color: var(--primary) rgba(255, 255, 255, 0.15);
    }
  }
}
/* CARDS ON TABLETS AND PHONES END */
