/**
 * Najibul Smart Ads — 4-Mode Dynamic Styling (2026-11-17)
 * Day / Dark / Night — token-driven via --njp-* (child theme).
 * Fallback hex keeps the slot legible even outside the theme context.
 * Zero CLS · reduced-motion respected · focus-visible for a11y.
 */

/* ── SLOT WRAPPER ─────────────────────────────────────────────── */
.najibul-adsense-slot-wrap {
    box-sizing: border-box;
    margin: 24px auto;
    text-align: center;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: var(--njp-card-subtle, #F1EFEB);
    background: color-mix(in srgb, var(--njp-card-subtle, #F1EFEB) 55%, transparent);
    border: 1.5px dashed var(--njp-border, #E2ECF7);
    border-radius: 14px;
    padding: 12px 10px;
    overflow: hidden;
    position: relative;
    transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.najibul-adsense-slot-wrap:hover {
    border-color: var(--njp-brand-accent, #0284C7);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--njp-brand-accent, #0284C7) 35%, transparent) inset,
        0 6px 22px color-mix(in srgb, var(--njp-brand-accent, #0284C7) 18%, transparent);
}

/* ── "ADVERTISEMENT" LABEL ─────────────────────────────────────── */
.najibul-adsense-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--njp-text-muted, #3F506E);
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-user-select: none;
    user-select: none;
}

.najibul-adsense-label::before,
.najibul-adsense-label::after {
    content: '';
    display: inline-block;
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--njp-border, #E2ECF7) 30%, var(--njp-border, #E2ECF7) 70%, transparent);
}

/* ── SKELETON SHIMMER (zero layout shift placeholder) ──────────── */
.najibul-adsense-skeleton {
    width: 100%;
    min-height: 90px;
    background: linear-gradient(90deg,
        var(--njp-card-subtle, #F1EFEB) 25%,
        var(--njp-elevated, #E2ECF7) 50%,
        var(--njp-card-subtle, #F1EFEB) 75%);
    background-size: 200% 100%;
    animation: najibulAdShimmer 2s infinite ease-in-out;
    border-radius: 10px;
}

@keyframes najibulAdShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── MOBILE ANCHOR AD — premium dark float (YouTube-style, all modes) ── */
.najibul-mobile-anchor-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999999;
    background: #0b1120;
    background: linear-gradient(180deg, #101a30 0%, #0b1120 100%);
    color: #e8edf7;
    border-top: 1px solid rgba(56, 189, 248, 0.32);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    text-align: center;
    box-sizing: border-box;
    animation: najibulAnchorSlide .28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes najibulAnchorSlide {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@media screen and (max-width: 768px) {
    .najibul-mobile-anchor-ad { display: block; }
}

.najibul-anchor-close-btn {
    position: absolute;
    top: -26px;
    right: 12px;
    background: #16213c;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px 8px 0 0;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    line-height: 1.2;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.najibul-anchor-close-btn:hover {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.5);
    background: #1b2744;
}

.najibul-anchor-close-btn:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .najibul-adsense-slot-wrap {
        margin: 18px auto;
        padding: 9px;
        min-height: 60px;
        max-width: 100%;
        border-radius: 12px;
    }
    .najibul-adsense-slot-wrap.in-article-slot { margin: 20px 0; }
}

@media screen and (max-width: 480px) {
    .najibul-adsense-slot-wrap {
        margin: 16px 0;
        padding: 7px;
        min-height: 50px;
        border-radius: 10px;
    }
}

/* ── ACCESSIBILITY ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .najibul-adsense-skeleton,
    .najibul-mobile-anchor-ad,
    .najibul-adsense-slot-wrap,
    .najibul-anchor-close-btn {
        animation: none !important;
        transition: none !important;
    }
}
