/* ===================================
   Bottom Navigation Bar - Mobile Only
   =================================== */

.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0px 4px 4px -8px rgba(0, 0, 0, 0.08), 0px 4px 16px 10px rgba(16, 24, 40, 0.02), 0px 2px 32px -4px rgba(16, 24, 40, 0.03);
    z-index: 1000;
    padding: 8px 0 0 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

/* Show bottom navigation only on mobile devices */
@media (max-width: 768px) {
    .bottom-navigation {
        display: flex;
    }

    /* Add padding to body to prevent content from being hidden behind the bottom nav */
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* Navigation Item Container */
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Ripple effect on tap */
.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Icon Container */
.bottom-nav-item__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bottom-nav-item__icon img,
.bottom-nav-item__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Label Text */
.bottom-nav-item__label {
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: bold;
    font-size: 10px;
    text-align: center;
    color: #3D3D3D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s ease;
}

/* Active State */
.bottom-nav-item.active .bottom-nav-item__label {
    color: #000000;
}

.bottom-nav-item.active .bottom-nav-item__icon {
    /* Optional: Add active state styling for icon */
}

/* Fixed Item (Login) - Always visible */
.bottom-nav-item.fixed {
    /* Special styling for fixed item if needed */
}

/* Loading State */
.bottom-navigation.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Loading Skeleton */
.bottom-nav-skeleton {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.bottom-nav-skeleton__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bottom-nav-skeleton__icon {
    width: 32px;
    height: 32px;
    background: #E0E0E0;
    border-radius: 50%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.bottom-nav-skeleton__label {
    width: 50px;
    height: 12px;
    background: #E0E0E0;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Error State */
.bottom-navigation.error {
    background: #FFF3E0;
}

/* Accessibility: Focus state for keyboard navigation */
.bottom-nav-item:focus {
    outline: 2px solid #4564ED;
    outline-offset: -2px;
}

/* Hide on desktop */
@media (min-width: 769px) {
    .bottom-navigation {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* Small mobile optimization */
@media (max-width: 360px) {
    .bottom-nav-item__label {
        font-size: 9px;
    }

    .bottom-nav-item__icon {
        width: 28px;
        height: 28px;
    }
}
