/*
 * Adblock hard wall — USA Today / news.com.au two-column layout.
 * Full-screen backdrop + centered card. NO dismiss path: reader must disable
 * or subscribe.
 */

.adblock-bait {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.adblock-wall {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    font-family: inherit;
    color: #0f172a;
    opacity: 0;
    transition: opacity 240ms ease;
}

.adblock-wall:not([hidden]) {
    opacity: 1;
}

.adblock-wall__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.adblock-wall__card {
    position: relative;
    width: min(880px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 32px 80px -20px rgba(15, 23, 42, 0.5), 0 12px 32px -12px rgba(15, 23, 42, 0.3);
    padding: 36px 40px 36px;
    text-align: center;
    transform: translateY(16px);
    transition: transform 260ms ease;
}

.adblock-wall:not([hidden]) .adblock-wall__card {
    transform: translateY(0);
}

/* ---------- brand block (top) ---------- */

.adblock-wall__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
    min-height: 64px;
}

/* When the configured header_logo is present we render an <img>; the text
   brand below is the no-logo fallback only. */
.adblock-wall__brand-logo {
    max-height: 72px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    display: block;
}

/* Screen-reader-only title — kept for aria-labelledby + assistive tech when
   the logo IMG is the visual brand. */
.adblock-wall__sr-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.adblock-wall__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #0ea5e9;
    color: #ffffff;
    font-size: 0;
}

.adblock-wall__brand-name {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #111827;
    text-transform: uppercase;
}

/* ---------- eyebrow + tagline ---------- */

.adblock-wall__eyebrow {
    margin: 4px 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}

.adblock-wall__tagline {
    margin: 0 0 32px;
    font-size: 1rem;
    line-height: 1.55;
    color: #4b5563;
}

/* ---------- two-column CTAs ---------- */

.adblock-wall__columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    margin: 8px auto 0;
    max-width: 720px;
}

.adblock-wall__column {
    text-align: center;
    padding: 8px 4px;
}

.adblock-wall__column-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.adblock-wall__divider {
    width: 1px;
    height: 100px;
    background: #e5e7eb;
}

.adblock-wall__cta {
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 999px;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 150ms ease, transform 80ms ease, box-shadow 150ms ease;
}

.adblock-wall__cta:active {
    transform: translateY(1px);
}

.adblock-wall__cta--primary {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 6px 14px -6px rgba(29, 78, 216, 0.55);
}

.adblock-wall__cta--primary:hover,
.adblock-wall__cta--primary:focus-visible {
    background: #1e40af;
    color: #ffffff;
    outline: none;
}

.adblock-wall__cta--subscribe {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 6px 14px -6px rgba(29, 78, 216, 0.55);
}

.adblock-wall__cta--subscribe:hover,
.adblock-wall__cta--subscribe:focus-visible {
    background: #1e40af;
    color: #ffffff;
    outline: none;
}

/* ---------- inline instructions panel ---------- */

.adblock-wall__instructions {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
}

.adblock-wall__instructions-intro {
    margin: 0 0 18px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #374151;
    text-align: center;
}

.adblock-wall__browser-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.adblock-wall__browser-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.adblock-wall__browser-tab:hover,
.adblock-wall__browser-tab:focus-visible {
    border-color: #9ca3af;
    background: #f3f4f6;
    color: #111827;
    outline: none;
}

.adblock-wall__browser-tab[aria-selected="true"] {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.adblock-wall__browser-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.adblock-wall__steps {
    margin: 0 auto 22px;
    padding-left: 28px;
    max-width: 620px;
    font-size: 0.96rem;
    line-height: 1.6;
    color: #1f2937;
}

.adblock-wall__steps li {
    margin-bottom: 10px;
}

.adblock-wall__steps li::marker {
    color: #1d4ed8;
    font-weight: 700;
}

.adblock-wall__instructions-outro {
    margin: 0 0 18px;
    font-size: 0.95rem;
    color: #4b5563;
    text-align: center;
}

.adblock-wall__still-blocked {
    margin: 0 auto 18px;
    padding: 12px 16px;
    max-width: 560px;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.92rem;
    text-align: center;
    border: 1px solid #fecaca;
}

.adblock-wall__cta--refresh {
    display: block;
    margin: 0 auto;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
    .adblock-wall__card {
        padding: 28px 22px 28px;
        border-radius: 12px;
    }

    .adblock-wall__brand-name {
        font-size: 1.3rem;
    }

    .adblock-wall__brand-logo {
        max-height: 56px;
        max-width: 240px;
    }

    .adblock-wall__eyebrow {
        font-size: 1.18rem;
    }

    .adblock-wall__columns {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 100%;
    }

    .adblock-wall__divider {
        width: 80%;
        height: 1px;
        margin: 0 auto;
        background: #e5e7eb;
    }

    .adblock-wall__cta {
        width: 100%;
        padding: 13px 20px;
    }

    .adblock-wall__steps {
        padding-left: 22px;
        font-size: 0.92rem;
    }
}

/* Lock background scroll when modal active (JS adds the class to <body>). */
body.adblock-wall-locked {
    overflow: hidden;
}

/* ---------- accessibility / themes ---------- */

@media (prefers-reduced-motion: reduce) {
    .adblock-wall,
    .adblock-wall__card {
        transition: none;
    }
}

@media (prefers-color-scheme: dark) {
    .adblock-wall__card {
        background: #111827;
        color: #f9fafb;
    }

    .adblock-wall__brand-name,
    .adblock-wall__eyebrow,
    .adblock-wall__column-title {
        color: #f9fafb;
    }

    .adblock-wall__tagline,
    .adblock-wall__instructions-intro,
    .adblock-wall__instructions-outro {
        color: #d1d5db;
    }

    .adblock-wall__steps {
        color: #e5e7eb;
    }

    .adblock-wall__divider {
        background: rgba(255, 255, 255, 0.1);
    }

    .adblock-wall__instructions {
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .adblock-wall__browser-tab {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }

    .adblock-wall__browser-tab:hover {
        background: #374151;
        color: #f9fafb;
    }

    .adblock-wall__still-blocked {
        background: #3f1d1d;
        color: #fca5a5;
        border-color: #7f1d1d;
    }
}
