/**
 * Mobile Bottom Sticky Navigation Bar
 *
 * Visible on mobile/tablet (< 1025px), hidden on desktop.
 * Includes safe-area-inset for notched devices (iPhone X+, gesture-nav Android)
 * and scroll-padding to prevent focused elements from being obscured (WCAG 2.2 SC 2.4.11).
 *
 * @package Ratna_Gems
 * @since   3.6.0
 */

/* ==========================================================================
   Bottom Navigation Bar
   ========================================================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
    display: block;
    /* Safe area for notched devices — defaults to 0px on standard devices */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-container {
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
    height: 54px;
    box-sizing: border-box;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #004e81;
    padding: 4px 12px;
    gap: 3px;
    transition: all 0.15s ease-out;
    flex: 1;
    max-width: 25%;
    border-radius: 8px;
    margin: 0 2px;
}

.nav-item:hover {
    background: rgba(0, 78, 129, 0.04);
}

.nav-item:active {
    background: rgba(0, 78, 129, 0.08);
}

.nav-item svg {
    fill: #004e81;
    width: 28px;
    height: 28px;
}

.nav-text {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #004e81;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Touch devices — explicit active feedback */
@media (hover: none) {
    .nav-item:active {
        background: rgba(0, 78, 129, 0.08);
    }
}

/* ==========================================================================
   Prevent content overlap (fixes footer overlap on mobile)
   WCAG 2.2 SC 2.4.11 — focused elements must not be obscured by fixed nav
   ========================================================================== */

@media (max-width: 1024px) {
    body {
        padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    }

    html {
        scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }
}

/* ==========================================================================
   Hide on Desktop (>= 1025px)
   ========================================================================== */

@media (min-width: 1025px) {
    .bottom-nav {
        display: none !important;
    }
}
