/* ============================================================
   CLAREO PWA MOBILE STYLES (Isolated — Desktop 100% untouched)
   Only active on screens <= 768px or in PWA standalone mode
   ============================================================ */

/* Desktop hide: Mobile navigation is NEVER shown on desktop */
.mobile-app-nav,
.mobile-app-header-badge {
    display: none !important;
}

@media (max-width: 768px), all and (display-mode: standalone) {
    /* Safe-area insets for modern iPhones with notch / dynamic island */
    body {
        padding-bottom: calc(75px + env(safe-area-inset-bottom)) !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* Compact, clean mobile top header */
    .cd-header {
        height: 54px !important;
        padding: 0 1rem !important;
    }

    .cd-header__logo span:not([style*="color"]) {
        font-size: 0.95rem !important;
    }

    .cd-header__product {
        display: none !important;
    }

    .cd-header__sep {
        display: none !important;
    }

    .cd-header__nav {
        gap: 0.4rem !important;
    }

    /* Icon-only square neo-brutalist buttons on mobile */
    .cd-header__nav .cd-btn {
        padding: 0.4rem !important;
        min-width: 34px !important;
        height: 34px !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .cd-header__nav .cd-btn .btn-text {
        display: none !important;
    }

    .cd-header__nav .theme-toggle-btn {
        width: 34px !important;
        height: 34px !important;
        border: 2px solid var(--ink, #FFFFFF) !important;
        border-radius: 0px !important;
    }

    /* Fixed Bottom Native Mobile Navigation Bar */
    .mobile-app-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--base, #1E2026);
        border-top: 2px solid var(--ink, #FFFFFF);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
    }

    .mobile-app-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        outline: none;
        cursor: pointer;
        color: var(--muted, #8E8E93);
        font-family: 'Space Grotesk', sans-serif;
        font-size: 0.68rem;
        font-weight: 600;
        gap: 4px;
        text-decoration: none;
        flex: 1;
        height: 100%;
        transition: color 0.15s ease, transform 0.15s ease;
    }

    .mobile-app-nav__item svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }

    .mobile-app-nav__item.active,
    .mobile-app-nav__item:active {
        color: var(--safety, #FF3E00);
        transform: scale(0.96);
    }

    .mobile-app-nav__item.active svg {
        stroke: var(--safety, #FF3E00);
    }

    /* Move Clara floating launcher button above the bottom mobile bar on phones */
    .clara-launcher {
        bottom: calc(72px + env(safe-area-inset-bottom)) !important;
        right: 1rem !important;
        padding: 0.4rem 0.8rem 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
        z-index: 9990 !important;
    }
}

