/* Bottom Navigation - Mobile Only */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #dee2e6;
    z-index: 1035;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: 60px;
    max-width: 100%;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 10px;
    padding: 6px 2px;
    transition: color 0.2s ease;
    position: relative;
    min-width: 0;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus {
    text-decoration: none;
    color: #495057;
}

.bottom-nav-item.active {
    color: #28a745;
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #28a745;
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

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

/* Scan button - Primary action (raised style) */
.bottom-nav-item.scan-btn {
    position: relative;
}

.bottom-nav-item.scan-btn .scan-btn-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bottom-nav-item.scan-btn .scan-btn-icon i {
    color: #fff;
    font-size: 22px;
    margin-bottom: 0;
}

.bottom-nav-item.scan-btn:hover .scan-btn-icon,
.bottom-nav-item.scan-btn:active .scan-btn-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5);
}

.bottom-nav-item.scan-btn span {
    margin-top: 2px;
    color: #28a745;
    font-weight: 600;
}

.bottom-nav-item.scan-btn.active::before {
    display: none;
}

/* Badge for notifications */
.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(12px);
    background: #dc3545;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

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

    /* Add padding to content wrapper to prevent overlap */
    .content-wrapper {
        padding-bottom: 70px !important;
    }

    /* Adjust floating help button position */
    .floating-help-btn {
        bottom: 140px !important;
    }

    /* Adjust install banner to be above bottom nav */
    .install-banner {
        bottom: 60px !important;
    }

    /* Hide footer on mobile when bottom nav is present */
    .main-footer {
        display: none;
    }
}

/* Extra small devices - tighter spacing */
@media (max-width: 360px) {
    .bottom-nav-item i {
        font-size: 18px;
    }

    .bottom-nav-item span {
        font-size: 9px;
    }

    .bottom-nav-item.scan-btn .scan-btn-icon {
        width: 46px;
        height: 46px;
    }

    .bottom-nav-item.scan-btn .scan-btn-icon i {
        font-size: 20px;
    }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .bottom-nav-items {
        height: 50px;
    }

    .bottom-nav-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .bottom-nav-item span {
        font-size: 9px;
    }

    .bottom-nav-item.scan-btn .scan-btn-icon {
        width: 44px;
        height: 44px;
        margin-top: -16px;
    }

    .content-wrapper {
        padding-bottom: 60px !important;
    }
}
