/* ========================================================================== */
/* NATIONALIST PARTY MOBILE POPUP / OVERLAY SYSTEM                           */
/* Isolated popup mobile module. Does not style mobile homepage/header.       */
/* ========================================================================== */

@media screen and (max-width: 760px) {
    .np-popup {
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        min-width: 0 !important;
        min-height: 0 !important;
        transform: none !important;
        resize: none !important;
        border-left: none !important;
        border-right: none !important;
    }

    .np-popup-header {
        min-height: 68px;
        padding: 12px 14px;
        gap: 10px;
    }

    .np-popup-title-block {
        gap: 10px;
    }

    .np-popup-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .np-popup h2 {
        font-size: 16px;
    }

    .np-popup-kicker {
        font-size: 10px;
        letter-spacing: 0.10em;
    }

    .np-reader-controls {
        gap: 5px;
    }

    .np-icon-button,
    .np-popup-close {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        font-size: 12px;
    }

    .np-popup-close {
        font-size: 24px;
    }

    .np-popup-body {
        padding: 20px 16px;
    }

    .np-popup p,
    .np-popup li {
        font-size: 16px;
        line-height: 1.55;
    }

    .np-document-reader {
        padding: 24px 16px 34px;
    }

    .np-document-reader h1 {
        font-size: 24px;
    }

    .np-popup-actions {
        position: sticky;
        bottom: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 14px;
    }

    .np-popup-button {
        width: 100%;
    }

    .np-document-footer {
        justify-content: stretch;
    }

    .np-reader-status {
        margin-right: 0;
        text-align: center;
    }

    .np-video-placeholder strong {
        font-size: 15px;
    }

    .np-video-placeholder span {
        font-size: 12px;
    }
}

/* =========================================================
   MOBILE POPUP VISIBILITY FIX
   Prevents inactive popups from rendering as page content.
   ========================================================= */

@media screen and (max-width: 760px) {
    .np-popup {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        transform: none !important;
        z-index: 8010 !important;
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .np-popup.active {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .np-popup-backdrop {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .np-popup-backdrop.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body.np-popup-locked {
        overflow: hidden !important;
    }
}
