/* Ads module. Colours use Blocksy variables so dark mode works. */
.sn-only-mobile { display: block; }
@media (min-width: 1000px) {
  .sn-only-mobile { display: none !important; }
}
@media (max-width: 999.98px) {
  .sn-only-desktop { display: none !important; }
}

.sn-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 100%;
}
.sn-ad__label {
  align-self: center;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--theme-text-color);
  opacity: .6;
}
.sn-ad__link {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: var(--theme-palette-color-6, rgba(128,128,128,.12));
}
.sn-ad__link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
}

/* Slots in the article and in lists */
.sn-ads-slot { clear: both; }
.sn-ads-slot--inarticle,
.sn-ads-slot--infeed {
  margin: 32px 0;
  padding: 16px 0;
  border-block: 1px solid var(--theme-palette-color-5, rgba(128,128,128,.25));
}
.sn-ads-slot--infeed { grid-column: 1 / -1; width: 100%; }
.sn-ads-slot--rail { margin: 40px 0 24px; grid-column: 1 / -1; width: 100%; }

/* Swipe rail */
.sn-ads-rail { position: relative; }
.sn-ads-rail__hint {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--theme-text-color);
  opacity: .65;
}
.sn-ads-rail__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 24px 12px 0;
  scrollbar-width: thin;
}
.sn-ads-rail__item {
  flex: 0 0 min(300px, 82%);
  max-width: 300px;
  scroll-snap-align: start;
}
.sn-ads-rail::after {
  /* fade on the right edge: tells the reader there is more */
  content: "";
  position: absolute;
  top: 24px;
  right: 0;
  bottom: 12px;
  width: 36px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--theme-palette-color-8, #fff));
}

/* Desktop helpers */
.sn-ads-column { display: flex; flex-direction: column; gap: 24px; }

/* Leaderboard */
.sn-ad--leaderboard { margin-block: 24px; }
.sn-ad--leaderboard .sn-ad__link { max-width: 970px; }
.sn-ad--leaderboard img { height: auto; }
@media (max-width: 689px) {
  .sn-ad--leaderboard {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
  }
  .sn-ad--leaderboard .sn-ad__link { max-width: none; border-radius: 0; }
}
