/**
 * Mobile Navbar CSS - Separate Mobile Navigation Component
 * Clean, modern mobile navbar design
 * Completely independent from desktop navbar
 */

/* ============================================
   MOBILE NAVBAR BASE STYLES
   ============================================ */

.mobile-navbar {
    display: none; /* Hidden by default, shown on mobile */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-navbar__container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Mobile Navbar Header */
.mobile-navbar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
}

/* Mobile Navbar Logo */
.mobile-navbar__logo {
    flex: 1;
    display: flex;
    align-items: center;
}

.mobile-navbar__logo-img {
    max-height: 32px;
    width: auto;
    height: auto;
    display: block;
}

/* Hamburger Toggle Button */
.mobile-navbar__toggle {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-navbar__toggle:hover {
    background: #F3F4F6;
}

.mobile-navbar__toggle:active {
    background: #E5E7EB;
}

.mobile-navbar__toggle-icon {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.mobile-navbar__toggle-icon span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: #1E40AF;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation - Active State */
.mobile-navbar__toggle.active .mobile-navbar__toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-navbar__toggle.active .mobile-navbar__toggle-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-navbar__toggle.active .mobile-navbar__toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navbar Overlay */
.mobile-navbar__overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.mobile-navbar__overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Navbar Menu */
.mobile-navbar__menu {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 60px);
    background: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-navbar__menu.active {
    right: 0;
}

/* Mobile Navbar Menu List */
.mobile-navbar__menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mobile Navbar Menu Item */
.mobile-navbar__menu-item {
    margin: 0;
    border-bottom: 1px solid #F3F4F6;
}

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

/* Mobile Navbar Menu Link */
.mobile-navbar__menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: #0F172A;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 56px;
    background: #ffffff;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-navbar__menu-link i {
    font-size: 20px;
    color: #64748B;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-navbar__menu-link span {
    flex: 1;
}

.mobile-navbar__menu-link:hover,
.mobile-navbar__menu-link:focus {
    background: #F8F9FA;
    color: #1E40AF;
    text-decoration: none;
}

.mobile-navbar__menu-link:hover i,
.mobile-navbar__menu-link:focus i {
    color: #1E40AF;
}

/* Active Menu Item */
.mobile-navbar__menu-item.active .mobile-navbar__menu-link {
    background: #EFF6FF;
    color: #1E40AF;
    font-weight: 600;
}

.mobile-navbar__menu-item.active .mobile-navbar__menu-link i {
    color: #1E40AF;
}

/* Login Button Style - White Background */
.mobile-navbar__menu-link--login-btn {
    background: #FFFFFF !important;
    color: #1E40AF !important;
    margin: 12px;
    border-radius: 8px;
    justify-content: center;
    border: 2px solid #1E40AF !important;
    font-weight: 600 !important;
}

.mobile-navbar__menu-link--login-btn .mobile-navbar__login-icon {
    color: #1E40AF !important;
    font-size: 14px !important; /* Small icon size */
    width: 18px !important;
}

.mobile-navbar__menu-link--login-btn:hover,
.mobile-navbar__menu-link--login-btn:focus {
    background: #F8F9FA !important;
    color: #1E3A8A !important;
    border-color: #1E3A8A !important;
}

.mobile-navbar__menu-link--login-btn:hover .mobile-navbar__login-icon,
.mobile-navbar__menu-link--login-btn:focus .mobile-navbar__login-icon {
    color: #1E3A8A !important;
}

/* Logout Button Style */
.mobile-navbar__menu-link--logout {
    color: #DC2626;
}

.mobile-navbar__menu-link--logout i {
    color: #DC2626;
}

.mobile-navbar__menu-link--logout:hover,
.mobile-navbar__menu-link--logout:focus {
    background: #FEF2F2;
    color: #DC2626;
}

.mobile-navbar__logout-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Divider */
.mobile-navbar__divider {
    height: 1px;
    background: #E5E7EB;
    margin: 8px 0;
    border: none;
    padding: 0;
}

/* ============================================
   RESPONSIVE DISPLAY
   ============================================ */

/* Show Mobile Navbar on Mobile/Tablet */
@media only screen and (max-width: 991px) {
    .mobile-navbar {
        display: block !important;
    }
    
    /* Adjust body padding for fixed mobile navbar */
    body {
        padding-top: 60px !important;
    }
}

/* Hide Mobile Navbar on Desktop */
@media only screen and (min-width: 992px) {
    .mobile-navbar {
        display: none !important;
    }
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS
   ============================================ */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .mobile-navbar__header {
        height: 70px;
        padding: 15px 20px;
    }
    
    .mobile-navbar__logo-img {
        max-height: 34px;
    }
    
    body {
        padding-top: 70px !important;
    }
    
    .mobile-navbar__menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .mobile-navbar__overlay {
        top: 70px;
    }
}

/* ============================================
   MOBILE SPECIFIC ADJUSTMENTS
   ============================================ */

@media only screen and (max-width: 767px) {
    .mobile-navbar__header {
        padding: 10px 12px;
    }
    
    .mobile-navbar__logo-img {
        max-height: 28px;
    }
    
    .mobile-navbar__menu {
        width: 80%;
    }
    
    .mobile-navbar__menu-link {
        padding: 14px 16px;
        font-size: 15px;
    }
}

/* ============================================
   ACCESSIBILITY & ANIMATIONS
   ============================================ */

/* Prevent body scroll when menu is open */
body.mobile-navbar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Smooth transitions */
.mobile-navbar__menu,
.mobile-navbar__overlay,
.mobile-navbar__toggle-icon span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.mobile-navbar__toggle:focus {
    outline: 2px solid #1E40AF;
    outline-offset: 2px;
}

.mobile-navbar__menu-link:focus {
    outline: 2px solid #1E40AF;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-navbar__header {
        border-bottom-width: 2px;
    }
    
    .mobile-navbar__menu-item {
        border-bottom-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mobile-navbar__menu,
    .mobile-navbar__overlay,
    .mobile-navbar__toggle-icon span {
        transition: none;
    }
}
