/* ============================================================
   BarqNews Pro — 16 — Ads
   ============================================================ */

.ad {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 16px 0;
}
.ad::before {
  content: "إعلان";
  display: block;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.ltr .ad::before { content: "Advertisement"; }

/* placeholder رمادي مخطط */
.ad .ad-slot {
  width: 100%;
  background:
    repeating-linear-gradient(135deg,
      var(--light-bg) 0 12px,
      var(--bg-color) 12px 24px);
  border: 1px dashed var(--border-color);
  border-radius: var(--glob-border-radius);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  padding: 8px;
}

/* Ad sizes */
.ad-728  .ad-slot { height: 90px;  max-width: 728px; }
.ad-300  .ad-slot { height: 250px; max-width: 300px; }
.ad-970  .ad-slot { height: 90px;  max-width: 970px; }
.ad-320  .ad-slot { height: 50px;  max-width: 320px; }

/* Locations */
[data-ad-location="header_before"]            { margin: 12px 0 0; }
[data-ad-location="header_after"]             { margin: 0 0 12px; }
[data-ad-location="singular_header_start"]    { margin: 0 0 24px; }
[data-ad-location="archive_posts_loop_end"]   { grid-column: 1 / -1; margin: 8px 0; }
[data-ad-location="widget"]                   { margin: 0; }
[data-ad-location="widget"] .ad-slot          { border-radius: var(--glob-border-radius); }

/* ---------- Sticky bottom ad ---------- */
.ad.sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  margin: 0;
  background: rgba(var(--card-bg-rgb), 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  padding: 10px 8px 10px;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}
.ad.sticky.active { transform: translateY(0); }
.ad.sticky::before { display: none; }

.ad.sticky .ad-slot {
  height: 50px;
  max-width: 320px;
  background:
    repeating-linear-gradient(135deg,
      var(--light-bg) 0 12px,
      var(--bg-color) 12px 24px);
}

.ad-close {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--site-font);
  transition: background var(--transition-fast);
}
.ad-close:hover { background: var(--light-bg); }
