/**
 * Mobile Menu Slider Styles
 * Fixed overlay menu that slides in from the right
 */

/* Mobile menu wrapper - creates the animation container */
.header-mobile-menu-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
    z-index: 999;
    overflow: hidden;
}

/* Show overlay when menu is active */
.header.active .header-mobile-menu-wrapper {
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.5);
}

/* Main mobile menu container - slides from right */
.header-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 85%;
    height: 100vh;
    background: white;
    overflow: hidden;
    transform: translateX(-100%);
    -webkit-transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: -webkit-transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* Slide menu in when header is active */
.header.active .header-mobile-menu {
    transform: translateX(0);
    -webkit-transform: translateX(0);
}

/* Inner wrapper for main menu content — pushed left when submenu opens */
.menu-main-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    will-change: transform;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: -webkit-transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pushed-left state used by JS instead of Web Animations API */
.menu-main-content.panel-pushed,
.submenu-panel.panel-pushed {
    transform: translateX(-30%);
    -webkit-transform: translateX(-30%);
}

/* Mobile menu slide panel - for submenus */
.submenu-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: -webkit-transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 1;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
}

/* Slide in animation (panel moves from right to left) */
.submenu-panel.slide-view {
    transform: translateX(0);
    -webkit-transform: translateX(0);
}

/* Panel header row: back button + close button */
.submenu-panel-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.submenu-panel-header .menu-back-btn {
    flex: 1;
    border-bottom: none;
}

.submenu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: #111436;
    flex-shrink: 0;
    transition: background-color 200ms ease;
    font-family: inherit;
    touch-action: manipulation;
}

.submenu-close-btn:active,
.submenu-close-btn:hover {
    background-color: #f5f5f5;
}

.submenu-close-btn:focus {
    outline: 2px solid #06B4FF;
    outline-offset: -2px;
}

/* Back button styling */
.menu-back-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 500;
    color: #111436;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    text-align: left;
    transition: background-color 200ms ease;
    font-family: inherit;
    touch-action: manipulation;
}

.menu-back-btn:active,
.menu-back-btn:hover {
    background-color: #f5f5f5;
}

.menu-back-btn:focus {
    outline: 2px solid #06B4FF;
    outline-offset: -2px;
}

.menu-back-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: inherit;
}

/* Current menu title heading */
.submenu-title {
    font-size: 24px;
    font-weight: 500;
    color: #111436;
    margin: 0;
    padding: 20px 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* Submenu list styling */
.submenu-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu-list > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #757575;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 0px solid #f0f0f0;
    transition: background-color 200ms ease;
    font-weight: 500;
}

.submenu-list > li > a:active,
.submenu-list > li > a:hover {
    background-color: #f5f5f5;
}

.submenu-list > li > a:focus {
    outline: 2px solid #06B4FF;
    outline-offset: -2px;
}

/* Arrow indicator for items with children */
.submenu-list > li.menu-item-has-children > a::after {
    content: '›';
    font-size: 24px;
    color: #999;
    flex-shrink: 0;
}

/* Hide nested submenus in cloned lists */
.submenu-list ul {
    display: none;
}

/* Main menu top close bar */
.mobile-menu-close-bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px 10px;
    flex-shrink: 0;
}

.mobile-menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    color: #111436;
    border-radius: 4px;
    transition: background-color 200ms ease;
    flex-shrink: 0;
}

.mobile-menu-close-btn:hover,
.mobile-menu-close-btn:active {
    background-color: #f5f5f5;
}

.mobile-menu-close-btn:focus {
    outline: 2px solid #06B4FF;
    outline-offset: -2px;
}

/* Main menu list styling */
.header-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    /*flex: 1;*/
    overflow-y: auto;
}

.header-mobile-menu-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-mobile-menu-list > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: #111436;
    text-decoration: none;
    font-size: 24px;
    border-bottom: 0px solid #f0f0f0;
    transition: background-color 200ms ease;
    font-weight: 500;
}

.header-mobile-menu-list > li > a:active,
.header-mobile-menu-list > li > a:hover {
    background-color: #f5f5f5;
}

.header-mobile-menu-list > li > a:focus {
    outline: 2px solid #06B4FF;
    outline-offset: -2px;
}

/* Hide submenus - always, regardless of other rules */
.header-mobile-menu-list ul {
    display: none !important;
}

/* Arrow indicator for items with children */
.header-mobile-menu-list > li.menu-item-has-children > a {
    cursor: pointer;
}

.header-mobile-menu-list > li.menu-item-has-children > a::after {
    content: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');
    font-size: 24px;
    color: #999;
    flex-shrink: 0;
    transform: rotate(180deg);
}

/* Scrollbar styling */
.submenu-panel::-webkit-scrollbar,
.submenu-list::-webkit-scrollbar,
.menu-main-content::-webkit-scrollbar {
    width: 4px;
}

.submenu-panel::-webkit-scrollbar-track,
.submenu-list::-webkit-scrollbar-track,
.menu-main-content::-webkit-scrollbar-track {
    background: transparent;
}

.submenu-panel::-webkit-scrollbar-thumb,
.submenu-list::-webkit-scrollbar-thumb,
.menu-main-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.submenu-panel::-webkit-scrollbar-thumb:hover,
.submenu-list::-webkit-scrollbar-thumb:hover,
.menu-main-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile menu login section */
.header-mobile-menu .header-login {
    margin-top: auto;
    padding: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    margin: 20px 10px 50px;
}
.mob-header-icon{
  background-color: #06B4FF;
  transition: all 0.5s ease 0s;
  border: 1px solid #06B4FF;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin: 30px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mob-header-icon svg{
  width: 25px;
}

/* Animation performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .submenu-panel,
    .menu-back-btn,
    .submenu-list > li > a {
        transition: none;
    }
}

/* Desktop media query - hide mobile menu elements */
@media (min-width: 1024px) {
    .header-mobile-menu-wrapper,
    .header-mobile-menu {
        display: none !important;
    }
}
