/* ========================================
   MOBILE BOTTOM NAVIGATION - GLASSMORPHIC
   iOS-style bottom tab bar for mobile only
   ======================================== */

/* Bottom Navigation Container */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    /* Hidden by default, shown on mobile */
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    /* Extra bottom padding for iPhone safe area */

    /* Glassmorphic Effect */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* Border & Shadow */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1),
        0 -1px 0 rgba(255, 255, 255, 0.5) inset;

    /* Rounded top corners */
    border-radius: 20px;
}

/* Navigation Item - Default (Icon only) */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: #6d6d6d;
    min-width: 60px;
}

/* Icon */
.nav-item .material-icons,
.nav-item .material-icons-outlined {
    font-size: 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Label - Hidden by default */
.nav-item-label {
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: "Forum", serif;
    display: none;
    /* Hidden for inactive items */
}

/* Haptic-style tap animation */
.nav-item:active {
    transform: scale(0.9);
}

/* Active state - Icon + label horizontally with glassmorphic effect */
.nav-item.active {
    color: #d84315;

    /* Glassmorphic Effect */
    background: rgba(216, 67, 21, 0.08);
    /* Very subtle orange tint */
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);

    /* Subtle border and glow */
    border: 1px solid rgba(216, 67, 21, 0.2);
    box-shadow: 0 2px 12px rgba(216, 67, 21, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;

    /* Layout */
    flex-direction: row;
    /* Horizontal layout */
    gap: 8px;
    /* Space between icon and label */
    padding: 8px 16px;
    border-radius: 20px;
    /* Rounded pill shape */
    outline: none;
}

/* Remove any pseudo-elements */
.nav-item.active::before,
.nav-item.active::after {
    display: none !important;
    content: none !important;
}

.nav-item.active .material-icons,
.nav-item.active .material-icons-outlined {
    transform: translateY(0);
    filter: drop-shadow(0 2px 8px rgba(216, 67, 21, 0.4));
    color: #d84315;
}

.nav-item.active .nav-item-label {
    font-weight: 600;
    color: #d84315;
    display: block;
    /* Show label for active item */
    /* Hide label for active item too */
}


/* ===== EXPLORE POPUP MENU ===== */

.explore-popup {
    position: fixed;
    bottom: 80px;
    left: 65%;
    transform: translateX(-50%) translateY(100%);
    width: 60%;
    max-width: 320px;
    z-index: 9998;

    /* Glassmorphic Effect */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);

    /* Border & Shadow */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15),
        0 2px 0 rgba(255, 255, 255, 0.6) inset;

    /* Animation */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.explore-popup.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Popup Items */
.explore-popup-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #3e2723;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.explore-popup-item:last-child {
    border-bottom: none;
}

.explore-popup-item:first-child {
    border-radius: 20px 20px 0 0;
}

.explore-popup-item:last-child {
    border-radius: 0 0 20px 20px;
}

.explore-popup-item:active {
    background: rgba(255, 87, 34, 0.1);
    transform: scale(0.98);
}

.explore-popup-item .material-icons {
    font-size: 24px;
    color: #d84315;
    font-family: 'Material Icons' !important;
    /* Ensure Material Icons font */
}

.explore-popup-item span:not(.material-icons) {
    font-size: 15px;
    font-weight: 500;
    font-family: "Forum", serif;
}

/* ===== OVERLAY ===== */

.explore-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}


.explore-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Show on mobile only */
@media screen and (max-width: 900px) {
    .mobile-bottom-nav {
        display: flex !important;
        margin: 0 10px 10px 10px !important;
    }

    /* Show the bottom nav on mobile */

    /* ===== HIDE ON DESKTOP ===== */
    /* This media query is intentionally left empty as the content was moved out.
       The original content for .mobile-bottom-nav, .explore-popup, .explore-overlay
       is now handled by the min-width media query below. */
}

/* Hide on desktop */
@media screen and (min-width: 768px) {

    .mobile-bottom-nav,
    .explore-popup,
    .explore-overlay {
        display: none !important;
    }
}

/* Adjust body padding for bottom nav */
@media screen and (max-width: 767px) {
    body {
        padding-bottom: 80px !important;
    }
}