/* Ad-slot styling — reserve space to prevent CLS (Cumulative Layout Shift).
   Slots render empty until ads-loader.js fills them after a network activates. */

.ad-slot {
  display: block;
  margin: 1.5rem auto;
  text-align: center;
  min-height: 90px;
  overflow: hidden;
  position: relative;
}

.ad-slot:empty::before {
  content: "Advertisement";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  color: rgba(167, 139, 250, 0.15);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Specific slot sizes (reserve appropriate heights per placement) */
.ad-slot[data-slot="content-top"]    { min-height: 90px; max-width: 728px; }
.ad-slot[data-slot="content-mid"]    { min-height: 250px; max-width: 580px; }
.ad-slot[data-slot="content-bottom"] { min-height: 250px; max-width: 728px; }
.ad-slot[data-slot="sidebar-top"]    { min-height: 600px; max-width: 300px; }

/* Mobile sticky footer ad — high CPM slot */
.ad-sticky-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 11, 30, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(167, 139, 250, 0.25);
  padding: 8px 12px 8px;
  z-index: 198;  /* below legal banner (200), above content */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
}

.ad-sticky-mobile .ad-slot {
  margin: 0;
  min-height: 50px;
  flex: 1;
}

.ad-sticky-close {
  position: absolute;
  top: 2px;
  right: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #a8a2c8;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.ad-sticky-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Hide sticky on desktop */
@media (min-width: 769px) {
  .ad-sticky-mobile { display: none !important; }
}

/* Add bottom padding to body when sticky is visible, so content isn't obscured */
@media (max-width: 768px) {
  body:has(.ad-sticky-mobile:not([style*="none"])) {
    padding-bottom: 70px;
  }
}
