/* ═══════════════════════════════════════════════════════════════
   Ad containers for free-tier users. Amateur / Pro members never
   see these — js/ads.js removes .ad-slot markers from the DOM
   entirely, so there's no container, no empty space, no bleed.
   ═══════════════════════════════════════════════════════════════ */

/* Inert marker — zero layout impact until hydrated by js/ads.js */
.ad-slot { display: block; }
.ad-slot:empty { height: 0; margin: 0; padding: 0; border: 0; }

.ad-container {
  width: 100%;
  max-width: 728px;
  margin: 24px auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, rgba(216,180,90,0.05), rgba(216,180,90,0.015));
  border: 1px solid rgba(216,180,90,0.18);
  border-left: 3px solid rgba(216,180,90,0.55);
  border-radius: 8px;
  overflow: hidden;
}

/* Merch store promo banner — fills the slot until AdSense is approved */
.ad-promo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 90px;
  padding: 0 24px;
  color: #fff;
  text-decoration: none;
  transition: background 0.18s ease;
}
.ad-promo:hover { background: rgba(216,180,90,0.04); }

.ad-promo-tag {
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.ad-promo-text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  letter-spacing: -0.005em;
  text-align: center;
  max-width: 460px;
}

.ad-promo-cta {
  font-size: 14px;
  font-weight: 800;
  color: #D8B45A;
  letter-spacing: 0.01em;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color 0.15s ease, filter 0.15s ease;
}
.ad-promo:hover .ad-promo-cta {
  border-bottom-color: rgba(216,180,90,0.60);
  filter: brightness(1.08);
}

/* In-feed leaderboard variant — matches row rhythm */
.ad-slot--inline .ad-container { margin: 14px auto; }

/* Dismissible upgrade CTA, tucked under the first ad */
.ad-upgrade-cta {
  max-width: 728px;
  margin: -14px auto 24px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(216, 180, 90, 0.04);
  border: 1px solid rgba(216, 180, 90, 0.14);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.4;
}
.ad-upgrade-cta a {
  color: #D8B45A;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ad-upgrade-cta a:hover { filter: brightness(1.15); }
.ad-upgrade-cta__dismiss {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 160ms;
}
.ad-upgrade-cta__dismiss:hover { color: rgba(255, 255, 255, 0.80); }

/* Mobile: compact banner */
@media (max-width: 768px) {
  .ad-container {
    max-width: 320px;
    min-height: 50px;
    border-left-width: 2px;
  }
  .ad-promo {
    height: 50px;
    padding: 0 14px;
    gap: 10px;
    justify-content: space-between;
  }
  .ad-promo-tag { display: none; }
  .ad-promo-text {
    font-size: 12px;
    text-align: left;
    max-width: none;
    flex: 1;
    line-height: 1.25;
    /* Clip to two lines so 50px box doesn't blow out with long copy */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ad-promo-cta {
    font-size: 12px;
    flex-shrink: 0;
  }
  .ad-upgrade-cta {
    max-width: 320px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}
