/* Styles for the Angaza Native Mobile App */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
}

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

.nav-item.active {
    color: #3b82f6;
}

.nav-item:active {
    transform: scale(0.9);
}

/* Hide when not in app */
body:not(.is-native-app) .mobile-bottom-nav {
    display: none;
}

/* Adjust body padding so content isn't hidden by navbar */
body.is-native-app {
    padding-bottom: 80px !important;
    background: url('/static/images/app_bg.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
}

/* Ensure foreground content is readable over background */
body.is-native-app::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    /* Semi-transparent white overlay */
    z-index: -1;
}

/* Back button styles */
.app-back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: none;
    /* Only show in app */
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    border: none;
    color: #1e293b;
    cursor: pointer;
}

body.is-native-app .app-back-btn {
    display: flex;
}

/* Scan Button Styling - Floating prominent circle */
.nav-scan-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    margin-top: -35px !important;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4) !important;
    border: 4px solid white !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.nav-scan-btn span {
    color: white !important;
    font-weight: bold;
}

/* Scanner Overlay Support */
body.scanner-active {
    background: transparent !important;
}

body.scanner-active>*:not(#barcode-scanner-ui) {
    opacity: 0 !important;
    pointer-events: none !important;
}

#barcode-scanner-ui {
    display: none;
}

body.scanner-active #barcode-scanner-ui {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    background: transparent;
}