/* =========================================
   FOMO COINS RESPONSIVE STYLES
   ========================================= */

/* --- HIDE MOBILE ELEMENTS BY DEFAULT (DESKTOP) --- */
.burger-menu,
.mobile-menu-overlay {
    display: none !important;
}

@media (max-width: 768px) {

    /* 1. Global Header Reset for Burger Menu */
    .fomo-header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px);
        z-index: 2000 !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
        padding: 10px 0 !important;
    }

    .header-container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 15px !important;
        width: 100% !important;
    }

    .header-logo-standalone img {
        height: 35px !important;
    }

    .header-actions {
        display: flex !important;
        gap: 12px !important;
        align-items: center !important;
    }

    .header-pill.compact {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }

    .main-nav,
    .user-badge,
    .trigger-otp-popup:not(.mobile-access-link):not(.cart-points-balance) {
        display: none !important;
    }

    /* 2. Burger Menu Icon */
    .burger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 28px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 2001;
    }

    .burger-menu span {
        width: 100%;
        height: 2.5px;
        background: #1D2B4A;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    /* 3. Mobile Menu Overlay (Glassmorphism) */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(29, 43, 74, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 3000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        /* Force flex when active/visible */
        justify-content: center !important;
        align-items: center !important;
    }

    .mobile-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .mobile-menu-content {
        text-align: center;
        width: 100%;
    }

    .close-mobile-menu {
        position: absolute;
        top: 20px;
        right: 25px;
        background: transparent;
        border: none;
        color: white;
        font-size: 40px;
        cursor: pointer;
    }

    .mobile-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 30px !important;
        width: 100% !important;
    }

    .mobile-nav-link {
        color: white !important;
        text-decoration: none !important;
        font-size: 1.8rem !important;
        font-weight: 800 !important;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    .mobile-access-link {
        margin-top: 20px;
        padding: 12px 30px !important;
        border: 2px solid white !important;
        border-radius: 50px !important;
        font-size: 1.2rem !important;
    }

    .mobile-balance {
        margin-top: 20px;
        color: #00D1FF;
        font-weight: 800;
        font-size: 1.2rem;
    }

    /* 4. Global Body Fix for Menu Open */
    body.menu-open {
        overflow: hidden !important;
    }

    /* 5. Cart & Checkout Page Centering */
    .wp-block-woocommerce-cart.alignwide,
    .wp-block-woocommerce-checkout.alignwide,
    .woocommerce-checkout {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin-top: 80px !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    h1.entry-title,
    .entry-title {
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        font-size: 1.8rem !important;
        text-align: center !important;
        margin-top: 100px !important;
    }

    /* 6. FOMOCOINS Bubble (Mobile) - FIX OVERFLOW */
    .fomo-points-purchase.cart-points-balance {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
        max-width: 95vw !important;
        text-align: center !important;
        font-size: 0.8rem !important;
        /* Slightly smaller to fit */
        padding: 15px 10px !important;
        z-index: 9999 !important;
        background: #1D2B4A !important;
        color: #00D1FF !important;
        border-radius: 50px !important;
        border: 1px solid #00D1FF !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        /* Allow wrapping */
        line-height: 1.2 !important;
    }

    /* 7. Footer Visibility */
    .fomo-footer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 40px 20px !important;
    }

    /* Global Overflow Prevention */
    html,
    body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* FIX MOBILE MENU LAYOUT */
.mobile-nav-link {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    clear: both !important;
    flex: 0 0 100% !important;
}