/**
 * Newsmatic — Advertisement Styles
 *
 * Layout, spacing, and presentation for all ad containers.
 * No color overrides — inherits theme variables.
 *
 * @package Newsmatic
 * @since   2.0.0
 */

/* =========================================================
   Base Ad Wrapper
   ========================================================= */

.nm-ad-wrap {
    display: block;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-size: 0; /* collapse whitespace around inline ad iframes */
}

.nm-ad-wrap ins,
.nm-ad-wrap iframe,
.nm-ad-wrap img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

/* Label above ad (accessibility + UX) */
.nm-ad-wrap::before {
    content: attr(aria-label);
    display: block;
    font-size: 10px;
    font-family: inherit;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

/* =========================================================
   Full-Width Locations (header, below-nav, footer)
   ========================================================= */

.nm-ad-full-width {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
    box-sizing: border-box;
}

/* =========================================================
   Header Banner
   ========================================================= */

.nm-ad-header_banner {
    margin: 0;
}

/* =========================================================
   Below Navigation
   ========================================================= */

.nm-ad-below_nav {
    margin-bottom: 16px;
}

/* =========================================================
   In-Content Ad
   ========================================================= */

.nm-ad-in_content {
    margin: 28px auto;
    max-width: 100%;
    padding: 10px 0;
    clear: both;
}

/* =========================================================
   In-Feed Ad (archive pages)
   ========================================================= */

.nm-ad-in_feed {
    margin: 20px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

/* =========================================================
   Sidebar / Widget Ad
   ========================================================= */

.nm-ad-widget {
    margin: 12px 0;
}

/* =========================================================
   Footer Banner
   ========================================================= */

.nm-ad-footer_banner {
    padding: 16px 0;
}

/* =========================================================
   Mobile Sticky Bottom Ad
   ========================================================= */

#nm-sticky-mobile-ad {
    display: none; /* hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
    padding: 8px;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.35s ease;
}

#nm-sticky-mobile-ad.nm-hidden {
    transform: translateY(110%);
}

.nm-sticky-ad-close {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.15);
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 0;
    transition: background 0.2s ease;
}

.nm-sticky-ad-close:hover {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* Show only on mobile */
@media (max-width: 767px) {
    #nm-sticky-mobile-ad {
        display: block;
    }
}

/* =========================================================
   Dark Mode Adjustments (if theme uses .dark_bk on body)
   ========================================================= */

.dark_bk .nm-ad-wrap::before {
    color: rgba(255, 255, 255, 0.4);
}

.dark_bk .nm-ad-full-width {
    border-color: rgba(255, 255, 255, 0.08);
}

.dark_bk .nm-ad-in_feed {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark_bk #nm-sticky-mobile-ad {
    background: #1a1a2e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 480px) {
    .nm-ad-full-width {
        padding: 8px 0;
    }

    .nm-ad-in_content {
        margin: 20px auto;
    }
}
