/* Mobile-Specific Styles */

/* Mobile Header */
.mobile-header {
    display: none;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-user-icon {
    font-size: 1.25rem;
    color: var(--dark-color);
    padding: 0.5rem;
}

/* Desktop elements hidden on mobile */
.desktop-logo,
.desktop-nav,
.desktop-icons {
    display: flex;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1999;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: var(--primary-color);
    color: white;
}

.mobile-sidebar-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-sidebar-nav {
    padding: 0.5rem 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--dark-color);
    font-size: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.mobile-nav-item i {
    margin-right: 0.75rem;
    width: 20px;
    color: var(--primary-color);
}

.mobile-nav-item:hover {
    background: #f9fafb;
    color: var(--primary-color);
}

/* Mobile Submenu */
.mobile-nav-item.has-submenu {
    display: block;
    padding: 0;
}

.mobile-nav-item.has-submenu>span {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1rem 1.25rem;
}

.toggle-icon {
    transition: transform 0.3s;
    margin-left: auto;
    margin-right: 0 !important;
}

.mobile-nav-item.has-submenu.active .toggle-icon {
    transform: rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9fafb;
}

.mobile-nav-item.has-submenu.active .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu a {
    display: block;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    color: var(--dark-color);
    font-size: 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-submenu a:hover {
    background: white;
    color: var(--primary-color);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.25rem;
    color: #6b7280;
    font-size: 0.7rem;
    position: relative;
    transition: all 0.2s;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 25%;
    background: var(--secondary-color);
    color: white;
    font-size: 0.65rem;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 0.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    /* Hide desktop elements */
    .desktop-logo,
    .desktop-nav,
    .desktop-icons {
        display: none !important;
    }

    /* Show mobile elements */
    .mobile-header {
        display: flex !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    /* Adjust body padding for bottom nav */
    body {
        padding-bottom: 70px;
    }

    /* Navbar adjustments */
    .navbar {
        padding: 0.5rem 1rem;
    }

    /* Logo in mobile header */
    .mobile-header .logo {
        flex: 1;
        justify-content: center;
    }

    .mobile-header .logo img {
        height: 40px;
    }

    .mobile-header .logo-text {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) {

    .mobile-header,
    .mobile-bottom-nav,
    .mobile-sidebar,
    .mobile-menu-overlay {
        display: none !important;
    }
}