/* Mobile Hamburger Menu Styles */

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger Animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -70%;
    width: 70%;
    height: 100vh;
    background-color: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

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

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: #e9ecef;
    color: #007bff;
}

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 20px 0;
}

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

.mobile-menu-list > li {
    border-bottom: 1px solid #f0f0f0;
}

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

.mobile-menu-list a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-list a:hover {
    background-color: #f8f9fa;
    color: #007bff;
    padding-left: 25px;
}

.mobile-menu-list a:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #007bff;
}

/* Submenu Styles */
.mobile-menu-item-with-submenu {
    position: relative;
}

.mobile-submenu-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 15px 20px;
    text-align: left;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.mobile-submenu-toggle i {
    transition: transform 0.3s ease;
}

.mobile-submenu-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu a {
    padding: 12px 40px;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #e9ecef;
}

.mobile-submenu a:hover {
    background-color: #e9ecef;
    color: #007bff;
    padding-left: 45px;
}

/* Mobile Menu Actions */
.mobile-menu-actions {
    margin-top: 30px;
    padding: 0 20px;
}

.mobile-action-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.mobile-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-action-btn:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

.mobile-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Wallet Section */
.mobile-wallet-section {
    margin-bottom: 20px;
}

.mobile-wallet-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.mobile-wallet-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.mobile-fund-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #17a2b8;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-fund-btn:hover {
    background-color: #138496;
    transform: translateY(-1px);
}

/* Auth Section */
.mobile-auth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-signin-btn,
.mobile-signup-btn,
.mobile-signout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-signin-btn {
    background-color: #007bff;
    color: #fff;
}

.mobile-signin-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.mobile-signup-btn {
    background-color: #6c757d;
    color: #fff;
}

.mobile-signup-btn:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.mobile-signout-btn {
    background-color: #dc3545;
    color: #fff;
}

.mobile-signout-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Body scroll lock when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Main content push effect */
.main-content {
    transition: transform 0.3s ease;
}

.main-content.menu-open {
    transform: translateX(30%);
}

/* Responsive Design */
@media (max-width: 767px) {
    .hamburger-btn {
        display: flex;
    }
    
    /* Hide desktop navigation on mobile */
    .nav-menus-wrapper {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hamburger-btn,
    .mobile-overlay,
    .mobile-menu {
        display: none !important;
    }
}

/* Focus styles for accessibility */
.hamburger-btn:focus,
.mobile-menu-close:focus,
.mobile-submenu-toggle:focus,
.mobile-menu-list a:focus,
.mobile-action-btn:focus,
.mobile-wallet-btn:focus,
.mobile-fund-btn:focus,
.mobile-signin-btn:focus,
.mobile-signup-btn:focus,
.mobile-signout-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-menu {
        border: 2px solid #000;
    }
    
    .hamburger-line {
        background-color: #000;
    }
    
    .mobile-menu-list a {
        border-bottom: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hamburger-btn,
    .hamburger-line,
    .mobile-overlay,
    .mobile-menu,
    .mobile-submenu,
    .main-content,
    .mobile-action-btn,
    .mobile-wallet-btn,
    .mobile-fund-btn,
    .mobile-signin-btn,
    .mobile-signup-btn,
    .mobile-signout-btn {
        transition: none;
    }
}