/* F20 repo extras (screens/extras.js): featured banners and the Search tab's Other Sources. */

/* Banners: one row that scrolls sideways, snapping a banner at a time, as Sileo's featured view does. Sizes come
   from the repo's itemSize (aspect ratio) and itemCornerRadius, set as custom properties on the row. */
.featured-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 10px;
  scroll-padding: 0 10px;
}
.featured-row::-webkit-scrollbar { display: none; }
.featured-banner {
  position: relative;
  flex: 0 0 min(263px, calc(100% - 40px));
  aspect-ratio: var(--banner-ratio, 263 / 148);
  border-radius: var(--banner-radius, 10px);
  overflow: hidden;
  scroll-snap-align: start;
  background: #c7ccd4;
  -webkit-tap-highlight-color: transparent;
}
.featured-banner:only-child { flex-basis: 100%; }
.featured-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .2s;
}
.featured-banner img.loaded { opacity: 1; }
.featured-banner:active img { opacity: .75; }
.featured-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 10px 8px;
  color: #fff;
  font: bold 17px "Helvetica Neue", Helvetica, sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-title.no-shadow { background: none; text-shadow: none; }
.featured-box:empty, .payment-box:empty, .discovery:empty { display: none; }
