/**
 * adsense-1558938.css — Task #1558938: Google AdSense ad unit styles
 *
 * Owns: Layout and spacing for .sr-ad-unit wrappers.
 * Does NOT own: AdSense JS behavior, Auto Ads placement, armor zone CSS.
 *
 * Rules:
 * - Ads never overlap mobile sticky CTA (.hn-sticky-bottom) — bottom padding guards it
 * - Ads never overlap Crisp chat widget — right margin on mobile
 * - No popups, no interstitials, no layout-breaking units
 * - Responsive: collapses cleanly at 375px
 */

/* ── Base ad unit container ────────────────────────────────────────── */
.sr-ad-unit {
  display: block;
  text-align: center;
  margin: 0 auto;
  overflow: hidden;
  /* Prevent collapse on empty (Google hides unfilled units via height:0) */
  min-height: 0;
}

/* ── Leaderboard (728×90) — horizontal top/bottom placement ─────────── */
.sr-ad-unit--leaderboard {
  max-width: 728px;
  min-height: 90px;
  margin: 24px auto;
}

/* ── Medium Rectangle (300×250) — sidebar / inline ──────────────────── */
.sr-ad-unit--rect {
  max-width: 336px;
  min-height: 280px;
  margin: 24px auto;
}

/* ── In-article / responsive — full-width content placement ─────────── */
.sr-ad-unit--in-article {
  width: 100%;
  min-height: 100px;
  margin: 32px 0;
}

/* ── Section divider — between settlement cards, between paragraphs ──── */
.sr-ad-section-divider {
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin: 24px 0;
  background: #fafafa;
  text-align: center;
}

/* Label above ads (optional "Advertisement" disclosure) */
.sr-ad-unit::before {
  content: attr(aria-label);
  display: block;
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  line-height: 1;
}

/* ── Mobile (≤768px) ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Leaderboard collapses to responsive on mobile */
  .sr-ad-unit--leaderboard {
    max-width: 100%;
    min-height: 50px;
  }

  /* Keep ads clear of the mobile sticky CTA bar (≈56px tall) + safe area */
  .sr-ad-unit--before-footer {
    margin-bottom: 80px;
  }

  /* Keep ads clear of Crisp chat widget (bottom-right, ~60px) */
  .sr-ad-unit--rect {
    margin-right: 0;
  }
}

/* ── Desktop (≥1024px) ───────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .sr-ad-unit--leaderboard {
    min-height: 90px;
  }

  .sr-ad-unit--rect {
    min-height: 250px;
  }
}

/* ── Prevent ads from overlapping interactive elements ───────────────── */
/* Auto Ads: ensure Google's injected units clear the sticky CTA on mobile */
@media (max-width: 768px) {
  /* Push Auto Ads anchor units above the sticky CTA */
  .adsbygoogle[data-ad-format="anchor"] {
    bottom: 56px !important;
  }
}
