/**
 * Enhanced Mobile Header Styles for Careerfy Child Theme
 * Improved Style 1 with better UX and modern design
 */

/* Enhanced Mobile Header Strip */
.careerfy-mobilehder-strip,
.careerfy-mobilehder-strip.mobile-hder-style1 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: #F9FAFB !important;
    background-color: #F9FAFB !important;
    border-bottom: 1px solid #e1e5e9 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    display: none !important;
}

/* Show on mobile devices */
@media (max-width: 991px) {
    .careerfy-mobilehder-strip,
    .careerfy-mobilehder-strip.mobile-hder-style1 {
        display: block !important;
        background: #F9FAFB !important;
        background-color: #F9FAFB !important;
    }
}

/* Enhanced Mobile Header Container */
.mobile-hder-topcon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 60px;
    position: relative;
    width: 100%;
}

/* Enhanced Logo Container */
.mobile-logocon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-width: 0; /* Allow text truncation */
    margin-right: auto;
}

.mobile-logocon a {
    display: flex;
    align-items: center;
    text-decoration: none;
    max-width: 100%;
}

.mobile-logocon a img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* Enhanced Right Buttons Container */
.mobile-right-btnscon {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    order: 2;
}

/* Ensure logo stays on the left */
.mobile-logocon {
    order: 1;
}

/* Enhanced Mobile Navigation Toggle Button */
.mobile-navigation-togglebtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-navigation-togglebtn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-navigation-togglebtn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Hamburger Animation */
.mobile-navigation-togglebtn i {
    transition: transform 0.3s ease;
}

.mobile-navigation-togglebtn.active i {
    transform: rotate(90deg);
}

/* Enhanced User Account Button */
.mobile-right-btnscon a.jobsearch-useracount-hdrbtn,
.mobile-right-btnscon a.mobile-usernotifics-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 50%;
    color: #495057;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-right-btnscon a.jobsearch-useracount-hdrbtn:hover,
.mobile-right-btnscon a.mobile-usernotifics-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile login button styles */
.mobile-right-btnscon a.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 50%;
    color: #495057;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-right-btnscon a.mobile-login-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Empty button for alignment when user is not logged in */
.mobile-empty-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    /* Invisible placeholder to maintain layout */
}

/* Notification Badge */
.hderbell-notifics-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #dc3545;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Enhanced Custom Button */
.mobile-hdr-custombtn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.mobile-hdr-custombtn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    color: #ffffff;
}

.mobile-hdr-custombtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.mobile-hdr-custombtn i {
    margin-right: 6px;
    font-size: 14px;
}

/* Enhanced Mobile Sidebar */
.careerfy-mobile-hdr-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.careerfy-mobile-hdr-sidebar.animate-menu-open {
    left: 0;
}

/* Enhanced Sidebar Navigation */
.careerfy-sidebar-navigation {
    height: 100%;
    overflow-y: auto;
    padding-top: 60px; /* Account for mobile header height */
}

/* Enhanced Mobile Navbar */
.careerfy-mobile-navbar {
    list-style: none;
    margin: 0;
    padding: 0;
}

.careerfy-mobile-navbar > li {
    position: relative;
    border-bottom: 1px solid #f1f3f4;
}

.careerfy-mobile-navbar > li > a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.careerfy-mobile-navbar > li > a:hover {
    background: #f8f9fa;
    color: #212529;
    padding-left: 24px;
}

.careerfy-mobile-navbar > li.active > a {
    background: #007bff;
    color: #ffffff;
}

.careerfy-mobile-navbar > li > a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Enhanced Submenu */
.careerfy-mobile-navbar .sidebar-submenu {
    display: none;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.careerfy-mobile-navbar li.active > .sidebar-submenu {
    display: block;
}

.careerfy-mobile-navbar .sidebar-submenu > li > a {
    padding: 12px 20px 12px 52px;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
}

.careerfy-mobile-navbar .sidebar-submenu > li > a:hover {
    background: #e9ecef;
    color: #495057;
    padding-left: 56px;
}

/* Enhanced Child Navigation Opener */
.child-navitms-opner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.careerfy-mobile-navbar li.active > .child-navitms-opner {
    color: #ffffff;
    transform: translateY(-50%) rotate(180deg);
}

/* Enhanced Close Button */
.mobile-navclose-btn {
    position: absolute;
    right: -32px;
    top: 16px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.mobile-navclose-btn:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Enhanced Overlay */
.careerfy-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Responsive Adjustments */
@media (max-width: 480px) {
    .mobile-hder-topcon {
        padding: 10px 12px;
        min-height: 56px;
    }
    
    .mobile-logocon a img {
        max-height: 36px;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a.jobsearch-useracount-hdrbtn,
    .mobile-right-btnscon a.mobile-usernotifics-btn,
    .mobile-right-btnscon a.mobile-login-btn,
    .mobile-empty-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .mobile-hdr-custombtn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .careerfy-mobile-hdr-sidebar {
        width: 280px;
        left: -280px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .careerfy-mobilehder-strip {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .mobile-navigation-togglebtn,
    .mobile-right-btnscon a.jobsearch-useracount-hdrbtn,
    .mobile-right-btnscon a.mobile-usernotifics-btn {
        background: #2d2d2d;
        border-color: #444;
        color: #e9ecef;
    }
    
    .mobile-navigation-togglebtn:hover,
    .mobile-right-btnscon a.jobsearch-useracount-hdrbtn:hover,
    .mobile-right-btnscon a.mobile-usernotifics-btn:hover {
        background: #3d3d3d;
        color: #ffffff;
    }
    
    .careerfy-mobile-hdr-sidebar {
        background: #1a1a1a;
    }
    
    .careerfy-mobile-navbar > li > a {
        color: #e9ecef;
        border-bottom-color: #333;
    }
    
    .careerfy-mobile-navbar > li > a:hover {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .careerfy-mobile-navbar .sidebar-submenu {
        background: #2d2d2d;
        border-top-color: #444;
    }
    
    .careerfy-mobile-navbar .sidebar-submenu > li > a {
        color: #adb5bd;
        border-bottom-color: #444;
    }
    
    .careerfy-mobile-navbar .sidebar-submenu > li > a:hover {
        background: #3d3d3d;
        color: #e9ecef;
    }
}

/* Accessibility Improvements */
.mobile-navigation-togglebtn:focus,
.mobile-right-btnscon a:focus,
.mobile-hdr-custombtn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Smooth Scrolling */
.careerfy-sidebar-navigation {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Loading State */
.careerfy-mobilehder-strip.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animation for menu items */
.careerfy-mobile-navbar > li {
    animation: slideInLeft 0.3s ease forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.careerfy-mobile-navbar > li:nth-child(1) { animation-delay: 0.1s; }
.careerfy-mobile-navbar > li:nth-child(2) { animation-delay: 0.15s; }
.careerfy-mobile-navbar > li:nth-child(3) { animation-delay: 0.2s; }
.careerfy-mobile-navbar > li:nth-child(4) { animation-delay: 0.25s; }
.careerfy-mobile-navbar > li:nth-child(5) { animation-delay: 0.3s; }

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