/* SofaScore News Ad Styles */
.ad-slot {
  /* Hidden by default, shown by device-specific rules */
  display: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.advertisement-label {
  position: absolute;
  display: block;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Sofascore Sans";
  font-weight: 500;
  font-size: 12px;
  color: var(--neutral-default);
}

.ad-slot[data-position="below_nav"] {
  width: fit-content;
  margin: 16px auto 0;
}

.ad-slot[data-position="below_nav"] .advertisement-label {
  top: -14px;
}

/* DESKTOP (1480px and wider) */
@media (min-width: 1480px) {
  .ad-slot--desktop {
    display: block;
    z-index: 100;
  }

  .ad-slot[data-position="bottom_sticky"] .advertisement-label {
    position: absolute;
    top: unset;
    bottom: 0;
    left: 0;
    padding-inline-start: 4px;
    transform-origin: bottom left;
    transform: rotate(-90deg);
  }

  .ad-slot--desktop.ad-slot[data-position="bottom_sticky"] {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* MID DESKTOP (1000px - 1479px) */
@media (min-width: 1000px) and (max-width: 1479px) {
  .ad-slot--mid-desktop {
    display: block;
    z-index: 100;
  }

  .ad-slot[data-position="bottom_sticky"] .advertisement-label {
    top: -16px;
  }

  .ad-slot--mid-desktop.ad-slot[data-position="bottom_sticky"] {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* MOBILE (999px and smaller) */
@media (max-width: 999px) {
  .ad-slot--mobile {
    display: block;
    z-index: 100;
  }

  .ad-slot[data-position="bottom_sticky"] .advertisement-label {
    top: -12px;
  }

  .ad-slot--mobile.ad-slot[data-position="bottom_sticky"] {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
}

/** Sticky behavior in sidebars */

@media (max-height: 900px) {
  .sidebar {
    height: 100%;
    position: unset;
    top: unset;
  }

  .ad-slot[data-position="left_sidebar"]:last-child,
  .ad-slot[data-position="right_sidebar"]:last-child {
    position: sticky;
    top: 12px;
  }
}

/* Hide ads when printing */
@media print {
  .ad-slot {
    display: none !important;
  }
}
