/* Mobile Navigation Fixes for Golden Aurea Casino */
/* Created to fix mobile header, sidebar, and navigation issues */

/* ===== Mobile Header Fixes ===== */
/* Fix hamburger menu positioning and alignment */
@media (max-width: 768px) {
    /* Main header container fixes */
    .header {
        position: relative;
        z-index: 1050;
        background-color: #0b1019;
        padding: 10px 0;
        min-height: 50px;
    }

    /* Mobile menu button (hamburger) fixes */
    .header__mobile-menu {
        position: relative !important;
        width: 32px !important;
        height: 32px !important;
        background: #fff !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 10px !important;
    }

    /* Fix hamburger icon positioning */
    .header__mobile-menu-icon {
        position: absolute !important;
        background-color: #1f202d !important;
        border-radius: 2px !important;
        transition: 0.3s cubic-bezier(0.8, 0.5, 0.2, 1.4) !important;
        width: 18px !important;
        height: 2px !important;
        right: 0 !important;
        left: 0 !important;
        margin: auto !important;
    }

    .header__mobile-menu-icon:nth-child(1) {
        top: 9px !important;
    }

    .header__mobile-menu-icon:nth-child(2) {
        top: 15px !important;
    }

    .header__mobile-menu-icon:nth-child(3) {
        top: 21px !important;
    }

    /* Active state animations */
    .header__mobile-menu--open .header__mobile-menu-icon:nth-child(1) {
        transform: rotate(-45deg) !important;
        top: 15px !important;
    }

    .header__mobile-menu--open .header__mobile-menu-icon:nth-child(2) {
        opacity: 0 !important;
        transform: scale(0) !important;
    }

    .header__mobile-menu--open .header__mobile-menu-icon:nth-child(3) {
        transform: rotate(45deg) !important;
        top: 15px !important;
    }

    /* Mobile header wrapper */
    .header__mob-container,
    .header__mob-wrp {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 15px;
    }

    /* Logo positioning */
    .header__logo {
        flex: 1;
        max-width: 150px;
    }
}

/* ===== Mobile Sidebar Menu Fixes ===== */
@media (max-width: 768px) {
    /* Mobile menu container - using existing class */
    .mobile-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background-color: #0b1019 !important;
        z-index: 1200 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease-in-out !important;
        overflow-y: auto !important;
        display: block !important;
    }

    /* Active mobile menu state */
    .mobile-menu.active {
        transform: translateX(0) !important;
    }
    
    /* Mobile menu wrapper fixes */
    .mobile-menu__wrap {
        position: relative !important;
        top: 60px !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 60px) !important;
        transform: none !important;
        display: block !important;
        padding: 20px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Menu wrapper styling */
    .menu__wrap {
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    /* Menu links styling */
    .menu__link {
        display: block;
        padding: 15px 20px;
        color: #fff;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .menu__link:hover,
    .menu__link.active {
        background-color: #1e2430;
        color: #f5af42;
        padding-left: 30px;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 1150;
        display: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    /* Close button for mobile menu */
    .menu__close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1;
    }

    .menu__close::before,
    .menu__close::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: #fff;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .menu__close::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }
}

/* ===== Game Provider Tabs Fixes ===== */
@media (max-width: 768px) {
    /* Sticky games menu container */
    .sticky-games-menu-mob {
        position: sticky;
        top: 50px;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: #252630;
        transition: transform 0.4s;
        overflow: hidden;
    }

    /* Games menu mobile wrapper */
    .games-menu-mob {
        background: #252630;
        display: flex;
        align-items: center;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #3e3ef4 #252630;
    }

    /* Scrollbar styling */
    .games-menu-mob::-webkit-scrollbar {
        height: 4px;
    }

    .games-menu-mob::-webkit-scrollbar-track {
        background: #252630;
    }

    .games-menu-mob::-webkit-scrollbar-thumb {
        background: #3e3ef4;
        border-radius: 2px;
    }

    /* Games menu list */
    .games-menu-mob__list {
        margin: 0;
        padding: 10px 5px;
        list-style: none;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Individual game menu items */
    .games-menu-mob__item {
        display: inline-block;
        margin: 0;
        flex-shrink: 0;
    }

    /* Game menu links */
    .games-menu-mob__link {
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #7a7b91;
        padding: 8px 15px;
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .games-menu-mob__link:hover,
    .games-menu-mob__link--current {
        background-color: #3e3ef4;
        color: #fff;
    }

    /* Game menu icons */
    .games-menu-mob__icon {
        font-size: 18px;
        margin-right: 6px;
    }

    /* Providers mobile dropdown */
    .providers-mob {
        margin-right: 10px;
        position: relative;
        flex-shrink: 0;
    }

    .providers-mob__btn {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .providers-mob__btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    /* Providers dropdown */
    .providers-mob__dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #1e2430;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        min-width: 200px;
        max-height: 300px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1100;
    }

    .providers-mob.open .providers-mob__dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .providers-mob__list {
        list-style: none;
        padding: 10px 0;
        margin: 0;
    }

    .providers-mob__item {
        margin: 0;
    }

    .providers-mob__link {
        display: flex;
        align-items: center;
        padding: 10px 20px;
        color: #fff;
        transition: all 0.3s ease;
    }

    .providers-mob__link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #f5af42;
    }
}

/* ===== Mobile Balance and User Info Fixes ===== */
@media (max-width: 768px) {
    /* Mobile balance display */
    .mobile-balance {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        background-color: rgba(255, 255, 255, 0.05);
        margin: 10px 15px;
        border-radius: 8px;
    }

    .mobile-balance .info-icon {
        margin-right: 10px;
        width: 24px;
        height: 24px;
    }

    .mobile-balance .info-value {
        font-size: 16px;
        font-weight: bold;
        color: #f5af42;
    }

    /* Register button on mobile */
    .top-bar__sign-up,
    .button.button-primary {
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
        display: block;
        text-align: center;
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* ===== Additional Responsive Fixes ===== */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Top bar fixes */
    .top-bar {
        position: relative;
        z-index: 999;
        padding: 10px 0;
    }

    /* Hide desktop elements on mobile */
    .header__menu-icons:not(.mobMenu),
    .desktop-only {
        display: none;
    }

    /* Show mobile elements */
    .mobile-only {
        display: block;
    }

    /* Ensure proper spacing */
    #woocasino {
        padding-top: 50px;
    }

    /* Fix any overflow issues */
    body {
        overflow-x: hidden;
    }

    /* Adjust font sizes for mobile */
    body {
        font-size: 14px;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }

    /* Button adjustments */
    .btn,
    button {
        min-height: 44px; /* iOS touch target size */
        padding: 10px 20px;
    }

    /* Form input adjustments */
    input,
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
}

/* ===== Animation and Transition Enhancements ===== */
@media (max-width: 768px) {
    /* Smooth transitions */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Touch-friendly hover states */
    @media (hover: none) {
        .menu__link:hover,
        .games-menu-mob__link:hover,
        .providers-mob__link:hover {
            background-color: transparent;
        }
    }

    /* Active states for touch */
    .menu__link:active,
    .games-menu-mob__link:active,
    .providers-mob__link:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* ===== Z-Index Management ===== */
@media (max-width: 768px) {
    .header { z-index: 1050; }
    .mobMenu { z-index: 1100; }
    .mobile-menu-overlay { z-index: 1150; }
    .menu { z-index: 1200; }
    .providers-mob__dropdown { z-index: 1100; }
    .sticky-games-menu-mob { z-index: 1000; }
}
