/* ==========================================================================
   FLYING CHEETAH LABS - MOBILE-FIRST APP EXPERIENCE STYLESHEET
   Active strictly for Phone Aspect Ratios (< 768px / max-width: 767px)
   Preserves 100% of Desktop & Laptop Interfaces Unaltered
   ========================================================================== */

/* 1. Global Viewport & Horizontal Overflow Lock (Fixes mobile screen wobble) */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    -webkit-overflow-scrolling: touch;
}

/* 2. Mobile Thumb-Ergonomics & Touch Target Safety */
@media (max-width: 767px) {
    /* Touch tap highlight cleanup */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Prevent unwanted auto-zoom on iOS Safari when tapping inputs */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Dynamic safe-area padding for notched iPhones and modern Android navigation bars */
    .fc-mobile-safe-bottom {
        padding-bottom: max(env(safe-area-inset-bottom, 0px), 12px) !important;
    }

    .fc-mobile-safe-top {
        padding-top: max(env(safe-area-inset-top, 0px), 12px) !important;
    }

    /* Standard touch target minimum (44x44px) */
    .touch-target-44 {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Automatic body clearance for the mobile bottom navigation bar */
    body {
        padding-bottom: 5.5rem !important; /* ~88px */
    }

    /* Floating WhatsApp widget repositioning above bottom nav */
    #fcFloatingWhatsAppWrapper {
        bottom: 5.25rem !important; /* 84px above screen bottom */
        right: 1rem !important;
    }

    #fcWhatsAppPopup {
        bottom: 5.25rem !important;
        right: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
    }
}

/* 3. Utility: Smooth Hide Scrollbar for Horizontal Touch Swiping */
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.no-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* 4. Native Mobile Bottom Navigation Animations */
#fcMobileBottomNav {
    will-change: transform, opacity;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
}

#fcMobileBottomNav .fc-nav-active {
    color: #C2410C !important;
    font-weight: 800 !important;
}

#fcMobileBottomNav .fc-nav-active:hover {
    color: #9A3412 !important;
}

#fcMobileBottomNav a:hover,
#fcMobileBottomNav button:hover {
    color: #0F172A;
}

#fcMobileBottomNav .fc-nav-wa:hover {
    color: #065F46;
}

#fcMobileBottomNav .fc-nav-active i {
    transform: scale(1.12);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 5. Mobile 9:16 Video Canvas Ratio Helper */
@media (max-width: 767px) {
    .fc-reel-ratio-box {
        width: 100% !important;
        max-width: 350px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        aspect-ratio: 9 / 16 !important;
    }
}


/* ==========================================================================
   6. Mobile Header Responsive Layout (390px Viewport Stability)
   Guarantees brand stability, prevents flex-shrink collapse, and ensures hamburger visibility
   ========================================================================== */
@media (max-width: 767px) {
    /* Safe container padding on narrow viewports */
    header .max-w-7xl {
        padding-left: 0.75rem !important; /* 12px */
        padding-right: 0.75rem !important; /* 12px */
    }

    /* Prevent brand container, logo image, and text from collapsing or wrapping destructively */
    header .max-w-7xl > a:first-child,
    header .max-w-7xl > div:first-child {
        flex-shrink: 0 !important;
        min-width: 0 !important;
    }

    /* Ensure actions container never shrinks or pushes buttons off-screen */
    header .max-w-7xl > div:last-child {
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Guarantee mobile hamburger button is visible, ergonomic, and never shrunk */
    #fcMobileMenuBtn {
        display: inline-flex !important;
        flex-shrink: 0 !important;
    }

    /* Keep auth button compact on small screens */
    header .fc-auth-slot button {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
    }

    /* Defensive fallback: Ensure admin header email subtitle never renders on mobile */
    header .max-w-7xl div h1 + span {
        display: none !important;
    }
}
