/* ==========================================================================
   GLOBAL MOBILE & TABLET NATIVE APP EXPERIENCE
   Applied across entire Plan4Event project.
   Strictly scoped to @media (max-width: 991.98px).
   [Desktop min-width: 992px is 100% untouched and preserved]
   ========================================================================== */

/* 1. DESKTOP PRESERVATION: HIDE MOBILE APP DOCK COMPLETELY */
@media (min-width: 992px) {
    .global-mobile-app-dock {
        display: none !important;
    }
}

/* 2. MOBILE & TABLET APP EXPERIENCE (< 992px) */
@media (max-width: 991.98px) {
    /* Touch & Smooth Inertia Scrolling */
    html {
        -webkit-tap-highlight-color: transparent;
        scroll-behavior: smooth;
    }

    body {
        padding-bottom: 74px !important; /* Space for Fixed Mobile Bottom Dock */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    /* Reposition Floating WhatsApp & Back to Top above bottom dock */
    .whatsapp-float,
    a[href*="whatsapp.com"],
    a[href*="wa.me"] {
        bottom: 78px !important;
        right: 16px !important;
        z-index: 1030 !important;
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.42) !important;
        transition: transform 0.15s ease !important;
    }
    .whatsapp-float:active {
        transform: scale(0.92) !important;
    }

    #backTop,
    .back-to-top {
        bottom: 78px !important;
        left: 16px !important;
        z-index: 1030 !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
    }

    /* Global Mobile App Bottom Navigation Dock */
    .global-mobile-app-dock {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1045;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 62px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .dock-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: #64748b;
        text-decoration: none !important;
        font-size: 11px;
        font-weight: 600;
        border: none;
        background: transparent;
        cursor: pointer;
        transition: color 0.15s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
        padding: 2px 0;
    }

    .dock-nav-item i {
        font-size: 17px;
        margin-bottom: 2px;
        transition: transform 0.15s ease, color 0.15s ease;
    }

    .dock-nav-item:active {
        transform: scale(0.92);
    }

    .dock-nav-item.active,
    .dock-nav-item:hover {
        color: #fa1671 !important;
    }

    .dock-nav-item.active i {
        transform: translateY(-2px);
        color: #fa1671 !important;
    }

    /* Center elevated circular action button (Plan Event) */
    .dock-nav-cta {
        position: relative;
        top: -12px;
    }

    .dock-cta-circle {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #fa1671 0%, #d80d5d 100%);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(250, 22, 113, 0.42);
        margin-bottom: 2px;
        transition: transform 0.15s ease;
    }

    .dock-cta-circle i {
        font-size: 20px;
        color: #ffffff !important;
        margin-bottom: 0;
    }

    .dock-nav-cta:active .dock-cta-circle {
        transform: scale(0.90);
    }

    .dock-nav-cta span {
        color: #fa1671 !important;
        font-weight: 700 !important;
    }

    /* Mobile Header & Brand Logo */
    .mobile-brand-logo {
        max-height: 40px !important;
        width: auto !important;
        object-fit: contain !important;
        display: inline-block !important;
    }

    /* Mobile Header & Navbar touch polish */
    .main-nav {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }

    /* Mobile Header Hamburger Toggle - High Visibility 3 Crisp Lines */
    .navbar-toggler {
        width: 42px !important;
        height: 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        background: #ffffff !important;
        border: 1.5px solid #dcd5df !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
        padding: 0 !important;
        transition: all 0.2s ease !important;
    }
    .navbar-toggler:hover,
    .navbar-toggler:focus,
    .navbar-toggler:active {
        background: #fff0f5 !important;
        border-color: #fa1671 !important;
        box-shadow: 0 0 0 3px rgba(250, 22, 113, 0.2) !important;
        outline: none !important;
    }
    .navbar-toggler .navbar-toggler-icon {
        width: 24px !important;
        height: 24px !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23222222' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        filter: none !important;
    }

    /* Native App touch press feedback for buttons and cards */
    button, .btn, .card, a.btn {
        touch-action: manipulation;
    }

    /* Hide floating WhatsApp and Back-to-Top when mobile nav menu is open */
    body.mobile-nav-open .whatsapp-float,
    body.mobile-nav-open a[href*="whatsapp.com"],
    body.mobile-nav-open a[href*="wa.me"]:not(#mainNav a),
    body.mobile-nav-open #backTop,
    body.mobile-nav-open .back-to-top {
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    /* Branded Mobile Drawer Social Icons Row */
    .mobile-nav-social-wrap {
        border-top: 1px solid #f1e4ec !important;
        padding-top: 14px !important;
        margin-top: 14px !important;
        text-align: center !important;
    }

    .mobile-social-heading {
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        color: #8c7e8a !important;
        margin-bottom: 12px !important;
    }

    .mobile-social-icons-row {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 14px !important;
        padding-bottom: 6px !important;
    }

    .nav-social-circle {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 20px !important;
        color: #ffffff !important;
        text-decoration: none !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .nav-social-circle:active {
        transform: scale(0.90) !important;
    }

    .social-whatsapp {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35) !important;
    }

    .social-instagram {
        background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
        box-shadow: 0 4px 12px rgba(220, 39, 67, 0.35) !important;
    }

    .social-facebook {
        background: linear-gradient(135deg, #1877F2 0%, #0d5cbf 100%) !important;
        box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35) !important;
    }

    .social-youtube {
        background: linear-gradient(135deg, #FF0000 0%, #c40000 100%) !important;
        box-shadow: 0 4px 12px rgba(255, 0, 0, 0.35) !important;
    }

}
