/* ==============================================================
   NP MOBILE STICKY FOOTER & DRAWERS STYLES
   Strictly isolated for screens <= 768px
   ============================================================== */
@media (min-width: 769px) {
    #np-mobile-sticky-wrapper,
    .np-drawer,
    #np-drawer-backdrop {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body.np-drawer-active {
        overflow: hidden !important;
        touch-action: none;
    }

    /* Fixed Wrapper at screen bottom */
    #np-mobile-sticky-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99990;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        box-sizing: border-box;
        pointer-events: auto;
    }

    /* Small Top Announcement / Breaking Banner */
    .np-mobile-small-banner {
        background: #111827;
        color: #ffffff;
        font-size: 13px;
        line-height: 1.3;
        border-top: 2px solid var(--np-primary, #d93025);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
        transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease;
    }
    .np-mobile-small-banner.is-hidden {
        display: none !important;
    }
    .np-banner-inner {
        display: flex;
        align-items: center;
        padding: 6px 12px;
        gap: 8px;
    }
    .np-banner-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: var(--np-primary, #d93025);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 4px;
        white-space: nowrap;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }
    .np-pulse-dot {
        width: 6px;
        height: 6px;
        background: #ffffff;
        border-radius: 50%;
        animation: npPulse 1.4s infinite;
    }
    @keyframes npPulse {
        0% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.3; transform: scale(1.3); }
        100% { opacity: 1; transform: scale(1); }
    }
    .np-banner-content {
        flex: 1;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .np-banner-link,
    .np-banner-text {
        color: #f3f4f6;
        text-decoration: none;
        font-weight: 500;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .np-banner-link:hover {
        color: #ffffff;
        text-decoration: underline;
    }
    .np-banner-dismiss {
        background: transparent;
        border: none;
        color: #9ca3af;
        padding: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        flex-shrink: 0;
    }
    .np-banner-dismiss:hover {
        color: #ffffff;
    }

    /* Fixed Bottom Bar */
    .np-mobile-sticky-bar {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.07);
        height: 58px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .np-bar-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        padding: 6px 2px;
        margin: 0;
        color: #4b5563;
        text-decoration: none;
        cursor: pointer;
        position: relative;
        transition: color 0.2s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .np-bar-item:active {
        transform: scale(0.94);
    }
    .np-bar-item.is-active {
        color: var(--np-primary, #d93025);
        font-weight: 600;
    }
    .np-bar-item.is-active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 25%;
        right: 25%;
        height: 3px;
        background: var(--np-primary, #d93025);
        border-radius: 0 0 3px 3px;
    }
    .np-bar-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 24px;
        width: 24px;
        margin-bottom: 2px;
    }
    .np-bar-custom-icon {
        width: 22px;
        height: 22px;
        object-fit: contain;
        display: block;
    }
    .np-bar-label {
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
    }

    /* Backdrop */
    .np-drawer-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 99991;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .np-drawer-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }

    /* General Drawer Styles */
    .np-drawer {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 86%;
        max-width: 360px;
        background: #ffffff;
        z-index: 99995;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        visibility: hidden;
        will-change: transform;
    }
    .np-drawer.is-active {
        visibility: visible;
    }

    /* Left Drawer (Recent Posts) */
    .np-drawer-left {
        left: 0;
        transform: translateX(-105%);
    }
    .np-drawer-left.is-active {
        transform: translateX(0);
    }

    /* Right Drawer (Trending Posts) */
    .np-drawer-right {
        right: 0;
        transform: translateX(105%);
    }
    .np-drawer-right.is-active {
        transform: translateX(0);
    }

    /* Menu Drawer (Left slide) */
    .np-drawer-menu {
        left: 0;
        transform: translateX(-105%);
    }
    .np-drawer-menu.is-active {
        transform: translateX(0);
    }

    /* Drawer Header */
    .np-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
        flex-shrink: 0;
    }
    .np-drawer-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 17px;
        font-weight: 700;
        color: #0f172a;
    }
    .np-site-brand {
        font-size: 18px;
        font-weight: 800;
        color: var(--np-primary, #d93025);
    }
    .np-drawer-badge {
        font-size: 11px;
        font-weight: 700;
        background: #e2e8f0;
        color: #334155;
        padding: 2px 7px;
        border-radius: 12px;
    }
    .np-badge-fire {
        background: #fee2e2;
        color: #dc2626;
    }
    .np-drawer-close {
        background: #e2e8f0;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #475569;
        cursor: pointer;
        padding: 0;
        transition: background 0.2s ease, color 0.2s ease;
    }
    .np-drawer-close:hover {
        background: #cbd5e1;
        color: #0f172a;
    }

    /* Drawer Body */
    .np-drawer-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 14px 16px 20px 16px;
    }

    .np-drawer-loader {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 36px 16px;
        color: #64748b;
        font-size: 14px;
        font-weight: 500;
    }
    .np-spinner {
        width: 20px;
        height: 20px;
        border: 2.5px solid #e2e8f0;
        border-top-color: #d93025;
        border-radius: 50%;
        animation: np-spin 0.75s linear infinite;
        display: inline-block;
    }
    @keyframes np-spin {
        to { transform: rotate(360deg); }
    }
    .np-no-posts {
        text-align: center;
        color: #94a3b8;
        padding: 30px 15px;
        font-size: 14px;
        margin: 0;
    }

    /* Drawer Footer & Bottom Action Controls */
    .np-drawer-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)) 16px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
        flex-shrink: 0;
        z-index: 20;
    }

    .np-drawer-bottom-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        max-width: 320px;
    }

    /* Swipe Hint Pill (Clicking closes drawer too) */
    .np-swipe-pill-hint {
        flex: 1;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: #f1f5f9;
        border: 1px solid #cbd5e1;
        border-radius: 22px;
        padding: 0 16px;
        font-size: 13.5px;
        font-weight: 700;
        color: #334155;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    }
    .np-swipe-pill-hint:active {
        background: #e2e8f0;
        border-color: #94a3b8;
        transform: scale(0.98);
    }
    .np-swipe-icon-anim {
        display: inline-block;
        font-size: 16px;
        font-weight: 900;
        line-height: 1;
        color: var(--np-primary, #d93025);
    }
    .np-anim-left {
        animation: npSwipeBounceLeft 1.3s infinite ease-in-out;
    }
    .np-anim-right {
        animation: npSwipeBounceRight 1.3s infinite ease-in-out;
    }
    @keyframes npSwipeBounceLeft {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(-5px); }
    }
    @keyframes npSwipeBounceRight {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }

    /* Circular 'इन्टु' (Cross / Close) Button */
    .np-drawer-close-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #1e293b;
        border: 1px solid #0f172a;
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
        padding: 0;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .np-drawer-close-btn:hover,
    .np-drawer-close-btn:active {
        background: #0f172a;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
        transform: scale(0.96);
    }

    /* Post Item in Drawers */
    .np-posts-list {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    .np-drawer-post-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f1f5f9;
    }
    .np-post-thumb-wrap {
        width: 78px;
        height: 56px;
        border-radius: 6px;
        overflow: hidden;
        flex-shrink: 0;
        background: #f1f5f9;
        display: block;
    }
    .np-post-thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .np-post-info {
        flex: 1;
        min-width: 0;
    }
    .np-post-cat {
        display: inline-block;
        font-size: 11px;
        font-weight: 700;
        color: var(--np-primary, #d93025);
        margin-bottom: 3px;
    }
    .np-post-title {
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1.35;
        margin: 0 0 4px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .np-post-title a {
        color: #1e293b;
        text-decoration: none;
    }
    .np-post-title a:hover {
        color: var(--np-primary, #d93025);
    }
    .np-post-time,
    .np-views-count {
        font-size: 11px;
        color: #64748b;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .np-post-meta-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Trending Items with Rank Numbers */
    .np-trending-item {
        position: relative;
    }
    .np-rank-badge {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #f1f5f9;
        color: #475569;
        font-size: 11px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 4px;
    }
    .np-rank-top {
        background: var(--np-primary, #d93025);
        color: #ffffff;
    }

    /* Menu Drawer Specifics */
    .np-drawer-search-form {
        margin-bottom: 16px;
    }
    .np-search-input-wrap {
        display: flex;
        align-items: center;
        background: #f1f5f9;
        border-radius: 8px;
        padding: 8px 12px;
        border: 1px solid #e2e8f0;
    }
    .np-search-icon {
        color: #64748b;
        margin-right: 8px;
    }
    .np-search-field {
        border: none;
        background: transparent;
        width: 100%;
        font-size: 14px;
        outline: none;
        color: #1e293b;
    }

    /* PWA Install Drawer Card */
    .np-pwa-drawer-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        border-radius: 10px;
        padding: 10px 14px;
        margin-bottom: 16px;
    }
    .np-pwa-card-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .np-pwa-app-icon {
        font-size: 24px;
    }
    .np-pwa-card-info strong {
        display: block;
        font-size: 13px;
        color: #1e3a8a;
    }
    .np-pwa-card-info small {
        display: block;
        font-size: 11px;
        color: #3b82f6;
    }
    .np-pwa-install-btn {
        background: #2563eb;
        color: #ffffff;
        border: none;
        font-size: 12px;
        font-weight: 700;
        padding: 6px 14px;
        border-radius: 6px;
        cursor: pointer;
    }

    /* Logo in Menu Drawer Header */
    .np-drawer-header-logo {
        padding: 12px 16px;
        background: #ffffff;
    }
    .np-drawer-logo-area {
        display: flex;
        align-items: center;
        max-width: 240px;
    }
    .np-drawer-logo-link {
        display: inline-flex;
        align-items: center;
    }
    .np-drawer-logo-img {
        max-height: 38px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        display: block;
    }

    /* Modern 2-Column Mobile Category / Menu Grid */
    .np-drawer-menu-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        list-style: none !important;
        margin: 12px 0 20px 0 !important;
        padding: 0 !important;
    }
    .np-grid-menu-item {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        align-items: stretch;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    .np-grid-menu-item:hover,
    .np-grid-menu-item:active,
    .np-grid-menu-item.current-menu-item {
        background: #ffffff;
        border-color: var(--np-primary, #d93025);
        box-shadow: 0 4px 12px rgba(217, 48, 37, 0.12);
        transform: translateY(-2px);
    }
    .np-grid-card-link {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 12px 14px !important;
        width: 100% !important;
        text-decoration: none !important;
        color: #1e293b !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        box-sizing: border-box !important;
    }
    .np-grid-menu-item.current-menu-item .np-grid-card-link {
        color: var(--np-primary, #d93025) !important;
    }
    .np-grid-card-bullet {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--np-primary, #d93025);
        flex-shrink: 0;
        transition: transform 0.2s ease;
    }
    .np-grid-menu-item:hover .np-grid-card-bullet {
        transform: scale(1.3);
    }
    .np-grid-card-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--np-primary, #d93025);
        font-size: 15px;
        flex-shrink: 0;
    }
    .np-grid-card-title {
        flex: 1;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .np-grid-menu-item .sub-menu {
        display: none !important;
    }
    .np-notice-hint {
        font-size: 11px;
        color: #64748b;
        background: #f8fafc;
        padding: 8px;
        border-radius: 6px;
        margin-bottom: 12px;
    }
}
