/* ==========================================
   MOBILE BOTTOM NAVIGATION BAR STYLES
   ========================================== */

@media (max-width: 767.98px) {
    /* The hamburger toggler (+ its slide-in menu) stays visible here on
       purpose - .mobile-bottom-nav only covers 5 shortcuts (Home/Ticket/
       Search/Bookings/Account), so it's not a substitute for the full menu
       (Live Tracking, Sign In/Register, My Wallet, Logout, ...). Previously
       force-hidden below this breakpoint, which left mobile browser users
       with no way to reach those. (The App WebView layout is unaffected -
       it never renders a .navbar-toggler at all, see _LayoutPublicMobile.) */
    /* Adjust body padding so content doesn't get cut off behind fixed nav */
    body {
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
    }
    /* Fixed Mobile Nav Container */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        background: rgb(13, 3, 56, 0.94);
        backdrop-filter: blur(10px) saturate(180%);
        -webkit-backdrop-filter: blur(10px) saturate(180%);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.25);
        z-index: 1040; /* Just below modals */
        display: flex;
        align-items: center;
        justify-content: center;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    /* Inner container */
    .mobile-bottom-nav-inner {
        display: flex;
        width: 100%;
        height: 100%;
        justify-content: space-around;
        align-items: center;
        position: relative;
    }
    /* Standard Nav Item */
    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: #94a3b8;
        text-decoration: none;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        gap: 2px;
        padding-top: 4px;
    }

        .mobile-bottom-nav .nav-item i {
            font-size: 19px;
            line-height: 1;
            margin-bottom: 1px;
            transition: transform 0.2s ease, color 0.2s ease;
        }

        .mobile-bottom-nav .nav-item .nav-label {
            font-size: 10px;
            font-weight: 600;
            line-height: 1;
            letter-spacing: 0.15px;
            color: #94a3b8;
            transition: color 0.2s ease;
        }

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

            .mobile-bottom-nav .nav-item.active i {
                transform: translateY(-1px);
                color: #ff9800;
            }

            .mobile-bottom-nav .nav-item.active .nav-label {
                color: #ff9800;
                font-weight: 700;
            }

            .mobile-bottom-nav .nav-item.active::after {
                content: '';
                position: absolute;
                bottom: 2px;
                width: 4px;
                height: 4px;
                border-radius: 50%;
                background-color: #ff9800;
                animation: dotScale 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            }
    /* FAB Wrapper */
    .mobile-bottom-nav .nav-item-fab-wrapper {
        position: relative;
        width: 72px;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1045;
    }
    /* Floating Action Button */
    .mobile-bottom-nav .nav-item-fab {
        position: absolute;
        top: -16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

        .mobile-bottom-nav .nav-item-fab .fab-circle {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(90deg, #610094, #0a00e9, #610094);
            background-size: 300% 300%;
            animation: gradientMove 6s ease infinite; /* Moving background gradient color */
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 4px 15px rgba(30, 60, 114, 0.2);
            border: 2px solid #ffffff; /* Clean white border separating from dark bar and page */
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .mobile-bottom-nav .nav-item-fab .fab-label {
            font-size: 10px;
            font-weight: 600;
            line-height: 1;
            letter-spacing: 0.15px;
            color: #94a3b8;
            margin-top: 4px;
            transition: color 0.2s ease;
        }

        .mobile-bottom-nav .nav-item-fab.active .fab-label {
            color: #ff9800;
            font-weight: 700;
        }

    /* Moving background gradient keyframes */
    @keyframes gradientMove {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    /* Stacked Bus + Search Icon inside FAB */
    .mobile-bottom-nav .nav-item-fab .fab-circle .fab-icon-stack {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
    }

    /* Running bus engine rumble keyframes (slowed down for a gentle rocking/breathing effect) */
    @keyframes busRumble {
        0% {
            transform: translateY(0) scale(1);
        }

        50% {
            transform: translateY(-1.2px) scale(1.02);
        }

        100% {
            transform: translateY(0) scale(1);
        }
    }

    .mobile-bottom-nav .nav-item-fab .fab-circle .fab-bus-icon {
        font-size: 22px;
        color: #ffffff !important;
        margin: 0;
        display: inline-block;
        animation: busRumble 0.8s infinite ease-in-out; /* Gentle engine breathing rocking */
    }

    /* Magnifier scan keyframes (slow scanning motion moving over the bus) */
    @keyframes magnifierScan {
        0% {
            transform: translate(0, 0) scale(1) rotate(0deg);
        }

        25% {
            transform: translate(-10px, -10px) scale(1.06) rotate(-15deg); /* moves to upper left of bus */
        }

        50% {
            transform: translate(-10px, 0) scale(1.12) rotate(15deg); /* moves to lower left of bus */
        }

        75% {
            transform: translate(0, -10px) scale(1.06) rotate(-10deg); /* moves to upper right of bus */
        }

        100% {
            transform: translate(0, 0) scale(1) rotate(0deg); /* back to bottom-right corner */
        }
    }

    .mobile-bottom-nav .nav-item-fab .fab-circle .fab-search-badge {
        position: absolute;
        bottom: -1px;
        right: -1px;
        font-size: 22px; /* Covers half of the bus icon */
        color: #ffffff !important; /* Vibrant orange magnifier */
        background: transparent !important; /* Transparent background */
        border: none !important; /* No border */
        box-shadow: none !important;
        margin: 0;
        animation: magnifierScan 6s infinite ease-in-out; /* Slow scanning movement */
        display: inline-flex;
        z-index: 2;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); /* Shadow outline to separate cleanly from white bus */
    }
    /* FAB Active State */
    .mobile-bottom-nav .nav-item-fab.active .fab-circle {
        transform: scale(1.08) translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(30, 60, 114, 0.3);
        background: linear-gradient(-45deg, #2a5298, #610094, #3f0071, #1e3c72);
        background-size: 300% 300%;
        animation: gradientMove 4s ease infinite;
        border-color: var(--primary, #ffffff); /* highlights border orange when active */
    }
    /* Bottom Sheet / Drawer Styles */
    .mobile-bottom-sheet {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        visibility: hidden;
        transition: visibility 0.3s;
    }

        .mobile-bottom-sheet.active {
            visibility: visible;
        }
        /* Sheet Backdrop */
        .mobile-bottom-sheet .bottom-sheet-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(1px);
            -webkit-backdrop-filter: blur(1px);
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        .mobile-bottom-sheet.active .bottom-sheet-backdrop {
            opacity: 1;
        }
        /* Sheet Content Container */
        .mobile-bottom-sheet .bottom-sheet-content {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: #ffffff; /* White background */
            border-radius: 24px 24px 0 0;
            border-top: 1px solid rgba(0, 0, 0, 0.08); /* Darker border for contrast on white */
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12); /* Softer shadow */
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.32, 0.94, 0.6, 1);
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            padding-bottom: env(safe-area-inset-bottom, 15px);
            color: #212529; /* Dark text */
        }

        .mobile-bottom-sheet.active .bottom-sheet-content {
            transform: translateY(0);
        }
        /* Drag handle indicator */
        .mobile-bottom-sheet .bottom-sheet-drag-handle {
            width: 42px;
            height: 5px;
            background: rgba(0, 0, 0, 0.1); /* Gray drag handle */
            border-radius: 3px;
            margin: 10px auto 4px auto;
            flex-shrink: 0;
        }
        /* Sheet Header */
        .mobile-bottom-sheet .bottom-sheet-header {
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* Gray header border */
            flex-shrink: 0;
        }

        .mobile-bottom-sheet .bottom-sheet-title {
            font-size: 16px;
            font-weight: 700;
            color: #212529; /* Dark title */
            margin: 0;
        }

        .mobile-bottom-sheet .btn-close-sheet {
            background: transparent;
            border: none;
            font-size: 24px;
            font-weight: 300;
            color: #6c757d; /* Muted dark close button */
            line-height: 1;
            padding: 0;
            cursor: pointer;
        }
        /* Sheet Body */
        .mobile-bottom-sheet .bottom-sheet-body {
            padding: 20px;
            overflow-y: auto;
        }
        /* Profile Summary */
        .mobile-bottom-sheet .user-profile-summary {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 22px;
            background: rgba(219, 114, 0, 0.06); /* Soft theme orange tint */
            padding: 15px;
            border-radius: 16px;
        }

        .mobile-bottom-sheet .user-avatar-circle {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary, #db7200), var(--primary-dark, #0d65d9));
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            box-shadow: 0 4px 10px rgba(219, 114, 0, 0.2);
        }

        .mobile-bottom-sheet .user-details .user-name {
            font-size: 18px;
            font-weight: 700;
            color: #212529; /* Dark user name */
            margin: 0 0 3px 0;
        }

        .mobile-bottom-sheet .user-badge {
            font-size: 11px;
            font-weight: 600;
            color: var(--primary, #db7200);
            background: rgba(219, 114, 0, 0.12); /* Slightly lighter badge background */
            padding: 2px 8px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

            .mobile-bottom-sheet .user-badge.operator-badge {
                color: #0d65d9;
                background: rgba(13, 101, 217, 0.1);
            }
        /* Info List */
        .mobile-bottom-sheet .user-info-list {
            list-style: none;
            padding: 0;
            margin: 0 0 25px 0;
        }

            .mobile-bottom-sheet .user-info-list li {
                display: flex;
                align-items: flex-start;
                gap: 12px;
                padding: 12px 4px;
                border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* Gray border */
            }

                .mobile-bottom-sheet .user-info-list li:last-child {
                    border-bottom: none;
                }

                .mobile-bottom-sheet .user-info-list li i {
                    font-size: 18px;
                    color: #6c757d; /* Slate gray icons */
                    margin-top: 2px;
                }

                .mobile-bottom-sheet .user-info-list li div {
                    display: flex;
                    flex-direction: column;
                }

                .mobile-bottom-sheet .user-info-list li .label {
                    font-size: 11px;
                    color: #8c96a3; /* Slate gray label */
                    font-weight: 500;
                    margin-bottom: 2px;
                }

                .mobile-bottom-sheet .user-info-list li .value {
                    font-size: 14px;
                    color: #212529; /* Dark value */
                    font-weight: 600;
                    word-break: break-all;
                }
        /* Actions styling */
        .mobile-bottom-sheet .btn-wallet-sheet {
            background: linear-gradient(135deg, #0d65d9, #0056d3);
            color: #ffffff !important;
            border: none;
            font-weight: 600;
            padding: 12px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(13, 101, 217, 0.25);
            text-decoration: none;
            transition: all 0.2s ease;
        }

            .mobile-bottom-sheet .btn-wallet-sheet:active {
                transform: scale(0.98);
            }

        .mobile-bottom-sheet .btn-profile-sheet {
            background: linear-gradient(135deg, var(--primary, #db7200), var(--primary-dark, #0d65d9));
            color: #ffffff !important;
            border: none;
            font-weight: 600;
            padding: 12px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(219, 114, 0, 0.25);
            text-decoration: none;
            transition: all 0.2s ease;
        }

            .mobile-bottom-sheet .btn-profile-sheet:active {
                transform: scale(0.98);
            }

        .mobile-bottom-sheet .btn-logout-sheet {
            background: #ffffff;
            color: #dc3545 !important;
            border: 1px solid rgba(220, 53, 69, 0.25);
            font-weight: 600;
            padding: 12px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

            .mobile-bottom-sheet .btn-logout-sheet:active {
                background: rgba(220, 53, 69, 0.05);
                transform: scale(0.98);
            }
}

/* Keyframes */
@keyframes dotScale {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* Hide on Desktop viewports */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none !important;
    }

    .mobile-bottom-sheet {
        display: none !important;
    }
}

/* ==========================================
   MOBILE ONLY MODERN APP-STYLE FOOTER
   ========================================== */
.mobile-footer {
    padding: 24px 16px calc(25px + env(safe-area-inset-bottom, 0px)) 16px; /* safe bottom padding for bottom nav */
    background: #111b27; /* dark matching background */
    color: #ffffff;
}

.mobile-footer-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Branding Card Styling */
.mobile-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .mobile-footer-brand .brand-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-footer-brand .brand-logo {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .mobile-footer-brand .brand-title {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.2;
    }

    .mobile-footer-brand .brand-subtitle {
        font-size: 12px;
        opacity: 0.7;
    }

    .mobile-footer-brand .brand-desc {
        font-size: 13px;
        opacity: 0.8;
        line-height: 1.5;
        margin: 0;
    }

/* Accordion Header styling */
.mobile-footer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

    .mobile-footer-card-header .mobile-card-title {
        font-size: 15px;
        font-weight: 600;
        color: #ffffff;
        display: flex;
        align-items: center;
    }

    .mobile-footer-card-header .collapse-icon {
        font-size: 14px;
        color: #a8b5ce;
        transition: transform 0.3s ease;
    }

    /* Rotate chevron when expanded */
    .mobile-footer-card-header[aria-expanded="true"] .collapse-icon {
        transform: rotate(180deg);
    }

/* Action lists for touch target size */
.mobile-action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .mobile-action-list li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

        .mobile-action-list li:last-child {
            border-bottom: none;
        }

        .mobile-action-list li a {
            display: flex;
            align-items: center;
            height: 44px; /* Optimized touch target */
            color: #a8b5ce !important;
            text-decoration: none !important;
            font-size: 14px;
            font-weight: 500;
            transition: color 0.2s ease, padding-left 0.2s ease;
        }

            .mobile-action-list li a i {
                font-size: 10px;
                margin-right: 10px;
                color: var(--primary, #db7200);
                transition: transform 0.2s ease;
            }

            .mobile-action-list li a:active {
                color: #ffffff !important;
                padding-left: 4px;
            }

/* Contact List styling */
.mobile-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    text-decoration: none !important;
    color: #a8b5ce !important;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

    .mobile-contact-item:last-child {
        border-bottom: none;
    }

    .mobile-contact-item i {
        font-size: 18px;
        color: var(--primary, #db7200);
        width: 24px;
        text-align: center;
    }

    .mobile-contact-item span {
        font-weight: 500;
    }

    .mobile-contact-item:active {
        color: #ffffff !important;
    }

/* Bottom copyright area */
.mobile-footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #a8b5ce;
    text-align: center;
}
