/* ============================================================
   WP News Ad Placements v2.2
   ============================================================ */

/* ── Shared label ───────────────────────────────────────────── */
.wpna-adlabel {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #aaa;
    text-align: center;
    margin-bottom: 4px;
    font-family: sans-serif;
}

/* ── Carousel base ──────────────────────────────────────────── */
.wpna-carousel { position: relative; overflow: hidden; line-height: 0; }
.wpna-slide    { display: none; width: 100%; }
.wpna-slide.wpna-active { display: block; }
.wpna-slide img { width: 100%; height: auto; display: block; }

/* Fade */
.wpna-slide { opacity: 0; transition: opacity .5s ease; position: absolute; top:0; left:0; pointer-events:none; }
.wpna-slide.wpna-active { opacity: 1; position: relative; pointer-events: all; }

/* Dots */
.wpna-dots { display:flex; justify-content:center; gap:5px; padding:5px 0 2px; background:rgba(0,0,0,.45); }
.wpna-dot  { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,.35); cursor:pointer; transition:background .3s; display:inline-block; }
.wpna-dot.wpna-dot-active { background:#fff; }

/* Close button */
.wpna-close {
    position:absolute; top:5px; right:6px;
    width:24px; height:24px; border:none;
    background:rgba(0,0,0,.55); color:#fff;
    font-size:12px; border-radius:50%; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    z-index:10; padding:0; line-height:1; transition:background .2s;
}
.wpna-close:hover { background:rgba(0,0,0,.85); }

/* ============================================================
   1. OVERLAY — bottom strip on featured image
   ============================================================ */
.wpna-thumb-wrap { position:relative; display:block; line-height:0; }
.wpna-thumb-wrap > img,
.wpna-thumb-wrap > a > img { width:100%; height:auto; display:block; }

.wpna-overlay-wrap {
    position:absolute; bottom:0; left:0; right:0; z-index:20;
    transform:translateY(105%);
    transition:transform .45s cubic-bezier(.22,.68,0,1.2);
}
.wpna-overlay-wrap.wpna-visible { transform:translateY(0); }
.wpna-overlay-wrap.wpna-gone   { display:none !important; }

.wpna-overlay-ad {
    position:relative; background:rgba(0,0,0,.72);
    backdrop-filter:blur(4px); padding:4px 4px 2px; overflow:hidden;
}
.wpna-carousel-overlay .wpna-slide img {
    max-height:100px; object-fit:cover; width:100%; border-radius:3px;
}
.wpna-overlay-ad .wpna-close { top:4px; right:4px; width:22px; height:22px; font-size:11px; }

/* ============================================================
   2. IN-FEED AD — full width, between post rows
   ============================================================ */
.wpna-infeed-ad {
    /* Force out of any grid/flex column */
    display:  block          !important;
    width:    100%           !important;
    max-width:100%           !important;
    clear:    both           !important;
    float:    none           !important;
    grid-column: 1 / -1     !important;  /* CSS Grid: span all columns */
    flex:     0 0 100%       !important;  /* Flexbox: full row           */
    align-self: stretch      !important;
    box-sizing: border-box;

    background: #f0f2f5;
    border-top:    3px solid #e0e0e0;
    border-bottom: 3px solid #e0e0e0;
    padding: 10px 12px;
    margin:  0 0 0 0 !important;
}
/* Make the carousel image tall enough to look like a proper ad banner */
.wpna-carousel-infeed .wpna-slide img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.wpna-carousel-infeed .wpna-dots      { background:#ddd; }
.wpna-carousel-infeed .wpna-dot       { background:#bbb; }
.wpna-carousel-infeed .wpna-dot.wpna-dot-active { background:#444; }

/* Desktop: make sure ad spans full row in 3-column grid */
@media (min-width: 768px) {
    .wpna-infeed-ad {
        grid-column: 1 / -1 !important;
        flex-basis: 100%    !important;
    }
    .wpna-carousel-infeed .wpna-slide img {
        max-height: 160px;
    }
}

/* ============================================================
   3. MOBILE STICKY BAR
   ============================================================ */
.wpna-mobile-bar {
    display: none;  /* CSS shows it only on mobile */
    position: fixed; bottom:0; left:0; right:0;
    z-index: 9999;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(6px);
    padding: 6px 6px 4px;
    box-shadow: 0 -2px 14px rgba(0,0,0,.35);
    transform: translateY(110%);
    transition: transform .4s cubic-bezier(.22,.68,0,1.2);
}
.wpna-mobile-bar.wpna-visible { transform: translateY(0); }
.wpna-mobile-bar.wpna-gone   { display: none !important; }
.wpna-mobile-bar .wpna-adlabel { color:rgba(255,255,255,.45); }
.wpna-mobile-close { top:4px; right:4px; }

.wpna-carousel-mobile .wpna-slide img {
    max-height: 90px; object-fit:cover; width:100%; border-radius:3px;
}

/* Show bar on mobile only */
@media (max-width: 767px) {
    .wpna-mobile-bar { display: block; }
    body.wpna-mobile-active { padding-bottom: 110px; }
}
@media (min-width: 768px) {
    .wpna-mobile-bar { display: none !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wpna-overlay-wrap, .wpna-mobile-bar, .wpna-slide { transition: none; }
}
