/* ============================================
   MOBILE HAMBURGER MENU - ENHANCED DESIGN
   Only applies on tablets and mobile devices
   ============================================ */

/* Hide mobile header by default (desktop) */
.mobile-menu-header {
    display: none;
}

/* Apply mobile menu styles only on screens smaller than 1200px (Bootstrap xl breakpoint) */
@media (max-width: 1199px) {

    /* Mobile menu overlay/background */
    .pbmit-mobile-menu-bg {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .pbmit-mobile-menu-bg.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile menu panel */
    #pbmit-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 999;
        overflow-y: auto;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    #pbmit-menu.show {
        right: 0;
    }

    /* Menu wrapper */
    .pbmit-menu-wrap {
        padding: 30px 20px;
        position: relative;
    }

    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 0 0 20px 0;
    }

    .mobile-menu-logo {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }

    .mobile-menu-logo img {
        height: 36px;
        width: auto;
        display: block;
    }

    /* Close button */
    .closepanel {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    #pbmit-menu .closepanel {
        color: #0036ff;
        font-size: 30px;
        line-height: 1;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    #pbmit-menu .closepanel-icon {
        font-size: 30px;
        line-height: 1;
    }

    #pbmit-menu .mobile-menu-header .closepanel {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
    }

    .closepanel:hover {
        background: rgba(255, 77, 87, 0.2);
        border-color: #ff4d57;
        transform: rotate(90deg) scale(1.1);
    }

    #pbmit-menu .closepanel:hover {
        color: #0028c9;
        background: transparent;
        border: none;
        transform: none;
    }

    .closepanel svg {
        width: 18px;
        height: 18px;
    }

    .closepanel rect {
        fill: #fff;
        transition: fill 0.3s ease;
    }

    .closepanel:hover rect {
        fill: #ff4d57;
    }

    /* Navigation list */
    .navigation {
        list-style: none;
        padding: 10px 0 20px 0;
        margin: 0;
    }

    .navigation li {
        margin-bottom: 8px;
        opacity: 0;
        transform: translateX(30px);
        animation: slideInRight 0.5s ease forwards;
    }

    .navigation li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .navigation li:nth-child(2) {
        animation-delay: 0.15s;
    }

    .navigation li:nth-child(3) {
        animation-delay: 0.2s;
    }

    .navigation li:nth-child(4) {
        animation-delay: 0.25s;
    }

    .navigation li:nth-child(5) {
        animation-delay: 0.3s;
    }

    .navigation li:nth-child(6) {
        animation-delay: 0.35s;
    }

    .navigation li:nth-child(7) {
        animation-delay: 0.4s;
    }

    @keyframes slideInRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Menu links */
    .navigation li a {
        display: block;
        padding: 14px 20px;
        color: #e2e8f0;
        font-size: 16px;
        font-weight: 500;
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        width: 100%;
    }

    .navigation li a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: linear-gradient(180deg, #0036FF 0%, #1976d2 100%);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .navigation li a:hover,
    .navigation li.active a {
        background: rgba(0, 54, 255, 0.15);
        color: #fff;
        transform: translateX(8px);
        padding-left: 28px;
    }

    .navigation li a .righticon {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        line-height: 1;
        display: flex;
        align-items: center;
        pointer-events: none; /* Make sure the link behind it gets the click */
    }

    .navigation li a:hover::before,
    .navigation li.active a::before {
        transform: scaleY(1);
    }

    /* Mobile auth menu specific styling */
    .mobile-auth-menu {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-auth-menu a {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        margin-bottom: 8px;
        color: #e2e8f0;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.05);
    }

    .mobile-auth-menu a:hover {
        background: rgba(0, 204, 102, 0.2);
        color: #00cc66;
        transform: translateX(5px);
    }

    .mobile-auth-menu a i {
        font-size: 16px;
        margin-right: 10px;
    }

    /* Logout link specific */
    .mobile-auth-menu a[href*="logout"]:hover {
        background: rgba(255, 77, 87, 0.2);
        color: #ff4d57;
    }

    /* Scrollbar styling */
    #pbmit-menu::-webkit-scrollbar {
        width: 6px;
    }

    #pbmit-menu::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    #pbmit-menu::-webkit-scrollbar-thumb {
        background: rgba(0, 54, 255, 0.5);
        border-radius: 3px;
    }

    #pbmit-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 54, 255, 0.8);
    }

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

    /* Hamburger button enhancement */
    .navbar-toggler {
        border: none;
        background: transparent;
        padding: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .navbar-toggler:hover {
        transform: scale(1.1);
    }

    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }

    .navbar-toggler i {
        font-size: 24px;
        color: #333;
        transition: color 0.3s ease;
    }

    .navbar-toggler:hover i {
        color: #0036FF;
    }

    /* Responsive adjustments */
    @media (max-width: 480px) {
        #pbmit-menu {
            width: 100%;
            max-width: 100%;
        }

        .navigation li a {
            font-size: 15px;
            padding: 12px 18px;
        }
    }
}

/* Dark theme for better contrast (Mobile Only) */
@media (max-width: 1199px) and (prefers-color-scheme: dark) {
    #pbmit-menu {
        background: linear-gradient(135deg, #0f0f1e 0%, #0a0a14 100%);
    }
}
