/**
 * Mobile Navigation Styles
 * Mobile menu component styles for responsive navigation
 * Requirements: 6.1, 6.3
 */

/* Mobile Menu Toggle Button - Requirement 6.1 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10003;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation when active */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Hide the toggle button when menu is open to avoid double close icons */
body.mobile-menu-open .header .main-header .header-content .header-utilities .mobile-menu-toggle {
    display: none !important;
}

/* Mobile Menu Container - Slide-in panel - Requirement 6.1 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 10060 !important;
    overflow-y: auto;
    transition: transform 0.3s ease; /* Use transform instead of right for better performance */
    transform: translateX(100%);
    padding: 0;
}

.mobile-menu.active {
    transform: translateX(0);
}



/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    font-size: 18px;
    font-weight: 700;
}

.mobile-logo img {
    max-height: 35px;
    width: auto;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333333;
    font-size: 20px;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.mobile-menu-close:hover {
    background: transparent;
    color: #00d4aa;
}

/* Mobile Navigation - Vertical layout - Requirement 6.3 */
.mobile-nav {
    padding: 10px 0;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mobile Navigation Items - Vertical layout - Requirement 6.3 */
.mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-link {
    flex: 1;
    display: block;
    padding: 12px 18px;
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link i {
    color: currentColor;
    transition: color 0.3s ease;
}

/* Make links with submenus clickable to toggle */
.mobile-nav-item.has-submenu > .mobile-nav-link-wrapper > .mobile-nav-link {
    cursor: pointer;
}

.mobile-nav-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
    text-decoration: none;
}

/* Submenu Toggle Button - Requirement 6.4 */
.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666666;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.submenu-toggle:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.submenu-toggle.active {
    color: #007bff;
}

.mobile-nav-link-wrapper:hover .mobile-nav-link,
.mobile-nav-link-wrapper:hover .submenu-toggle {
    color: #007bff;
}

.mobile-nav-link-wrapper:hover .mobile-nav-link {
    background-color: #f8f9fa;
}

.mobile-nav-link-wrapper:hover .submenu-toggle {
    background-color: #f8f9fa;
}

.submenu-toggle.active i {
    transform: rotate(45deg);
}

/* Mobile Submenu */
.mobile-submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu-item {
    border-bottom: none;
}

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

.mobile-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 18px 8px 36px;
    color: #555555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eef1f6;
}

.mobile-submenu-link:hover {
    color: #007bff;
    background-color: #ffffff;
    text-decoration: none;
    padding-left: 40px;
}

.mobile-submenu-link i {
    margin-right: 10px;
    font-size: 12px;
    color: #999999;
}

.mobile-submenu-link:hover i {
    color: #007bff;
}

/* Mobile Menu Overlay - Semi-transparent background */
.mobile-menu-overlay {
    display: none !important; /* Disable overlay so menu stays visible */
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: transparent;
    z-index: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.mobile-menu-overlay.active {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

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

/* Responsive Breakpoints */
@media (max-width: 1320px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 767px) {
    .mobile-menu {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-menu-header {
        padding: 12px 15px;
    }
    
    .mobile-nav-link {
        padding: 14px 15px;
        font-size: 14px;
    }
    
    .mobile-submenu-link {
        padding: 11px 15px 11px 35px;
        font-size: 13px;
    }
    
    .mobile-submenu-link:hover {
        padding-left: 40px;
    }
}
