/* Bottom Navigation for Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 1030;
    border-top: 1px solid #e0e0e0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--bs-dark);
    font-size: 0.875rem;
    padding: 6px 0px;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
}

.bottom-nav-item i {
    font-size: 1.1rem;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.bottom-nav-item span {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus {
    color: var(--bs-primary);
    text-decoration: none;
}

.bottom-nav-item.active {
    color: var(--bs-primary);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Add padding to body content on mobile to prevent overlap with bottom nav */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px;
    }

    /* Hide hamburger and navbar collapse on mobile */
    .navbar-toggler {
        display: none !important;
    }

    .navbar-collapse {
        display: none !important;
    }

    /* Make navbar smaller on mobile */
    .navbar {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Adjust footer padding on mobile */
    footer {
        padding-bottom: max(3rem, calc(3rem + env(safe-area-inset-bottom))) !important;
    }
}

/* Desktop - hide bottom nav */
@media (min-width: 992px) {
    .bottom-nav {
        display: none !important;
    }
}

/* PWA safe area support for iOS devices with notch */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Top Navigation Icons - Desktop */
@media (min-width: 992px) {
    #mainNavbar .navbar-nav .nav-link {
        display: inline-block;
        text-align: center;
        padding: 0.5rem 1.25rem;
        font-size: 1rem;
    }

    #mainNavbar .navbar-nav .nav-link i {
        font-size: 1.2rem;
        display: block;
        margin-bottom: 0.25rem;
    }

    /* Dropdown toggle - keep arrow inline with label */
    #mainNavbar .navbar-nav .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.3em;
        vertical-align: middle;
    }
}
