/* ===================================
   MOBILE BOTTOM NAVIGATION
   eTaxBook Solutions
   Uses color/shadow/radius variables from common.css
   =================================== */

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {

    /* Prevent footer content from being hidden behind the fixed bar */
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1035;
        height: 64px;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background-color: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top-left-radius: var(--radius-lg);
        border-top-right-radius: var(--radius-lg);
        box-shadow: 0 -8px 24px rgba(37, 54, 121, 0.14);
        border-top: 1px solid var(--border-light);
    }

    /* Shared item styles (applies to <a> and <button>) */
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: none;
        background: transparent;
        color: var(--text-gray);
        font-family: var(--ff-display);
        font-size: 0.65rem;
        font-weight: 500;
        text-decoration: none;
        padding: 6px 2px 4px;
        position: relative;
        transition: var(--transition-base);
    }

    .bottom-nav-item:hover,
    .bottom-nav-item:focus {
        color: var(--accent);
        outline: none;
    }

    .bottom-nav-icon {
        font-size: 1.25rem;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 28px;
        border-radius: 999px;
        transition: var(--transition-base);
    }

    .bottom-nav-label {
        letter-spacing: 0.2px;
    }

    /* Active state */
    .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-item.active .bottom-nav-icon {
        background-color: var(--accent-soft);
        color: var(--accent);
        transform: translateY(-2px);
    }

    .bottom-nav-item.active .bottom-nav-label {
        font-weight: 700;
    }

    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        top: 2px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background-color: var(--accent);
    }

    /* Center raised CTA */
    .bottom-nav-cta-wrap {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 2px;
    }

    .bottom-nav-cta {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: 4px solid var(--white);
        background: linear-gradient(135deg, var(--accent) 0%, #d85448 100%);
        color: var(--white);
        font-size: 1.35rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-18px);
        box-shadow: 0 6px 16px rgba(234, 98, 84, 0.45);
        transition: var(--transition-base);
        animation: bottomNavPulse 2.6s ease-in-out infinite;
        cursor: pointer;
    }

    .bottom-nav-cta:hover,
    .bottom-nav-cta:focus {
        transform: translateY(-22px) scale(1.06);
        box-shadow: 0 10px 20px rgba(234, 98, 84, 0.5);
        color: var(--white);
    }

    .bottom-nav-cta-wrap .bottom-nav-label {
        margin-top: -12px;
        color: var(--primary);
        font-weight: 600;
    }

    @keyframes bottomNavPulse {
        0%, 100% {
            box-shadow: 0 6px 16px rgba(234, 98, 84, 0.45), 0 0 0 0 rgba(234, 98, 84, 0.35);
        }

        50% {
            box-shadow: 0 6px 16px rgba(234, 98, 84, 0.45), 0 0 0 8px rgba(234, 98, 84, 0);
        }
    }

    /* Nudge the existing floating buttons up so they clear the new bar */
    .whatsapp-float {
        bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    }

    #backToTop {
        display: none !important;
    }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
    .bottom-nav-cta {
        animation: none;
    }
}