/* ============================================
   Mobile Navigation Styles - Matching Next.js
   ============================================ */

/* Mobile Navigation Overlay */
.modeo-mobile-nav-overlay {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 40 !important;
    touch-action: none !important;
    display: none !important; /* Hidden by default */
    visibility: hidden !important;
}

.modeo-mobile-nav-overlay[aria-hidden="false"] {
    display: block !important;
    visibility: visible !important;
}

@media (min-width: 768px) {
    .modeo-mobile-nav-overlay {
        display: none !important;
    }
}

/* Mobile Navigation Drawer */
.modeo-mobile-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 430px !important; /* Match mobile width */
    background-color: #ffffff !important;
    z-index: 50 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: none !important; /* Hidden by default */
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important; /* Hide overflow on main container */
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    visibility: hidden !important;
}

@media (min-width: 768px) {
    .modeo-mobile-nav {
        display: none !important;
    }
}

/* Mobile Nav Open State - Maximum specificity */
body .modeo-mobile-nav.modeo-mobile-nav-open,
.modeo-mobile-nav.modeo-mobile-nav-open {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    display: flex !important;
    visibility: visible !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 430px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important; /* Prevent body scroll, allow only scroll container */
}

/* Mobile Nav Scroll Container */
.modeo-mobile-nav-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important; /* CRITICAL: Allows flex child to shrink and enable scrolling */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    height: auto !important; /* Will be set by JS based on actual header height */
    max-height: none !important;
    position: relative !important;

    display: block !important;
    visibility: visible !important;
    /* Ensure content is visible */
    opacity: 1 !important;
}

/* Mobile Nav Item */
.modeo-mobile-nav-item {
    border-bottom: 1px solid #f3f4f6; /* gray-100 */
}

.modeo-mobile-nav-item > div:first-child {
    display: flex;
    align-items: center;
}

/* Mobile Nav Link */
.modeo-mobile-nav-link {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: left;
    transition: color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
    color: #1f2937; /* gray-800 */
    font-weight: 500;
}

.modeo-mobile-nav-link:hover {
    color: var(--primary);
    background-color: #f9fafb; /* gray-50 */
}

.modeo-mobile-nav-link.text-primary {
    color: var(--primary);
    font-weight: 600;
    background-color: rgba(204, 22, 22, 0.05); /* primary/5 */
}

/* Mobile Nav Toggle Button */
.modeo-mobile-nav-toggle {
    padding: 1rem;
    color: #6b7280; /* gray-500 */
    transition: color 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.modeo-mobile-nav-toggle:hover {
    color: var(--primary);
}

.modeo-mobile-nav-arrow {
    width: 1.25rem;
    height: 1.25rem;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.modeo-mobile-nav-item[data-submenu-open="true"] .modeo-mobile-nav-arrow {
    transform: rotate(180deg);
}

/* Mobile Nav Submenu */
.modeo-mobile-nav-submenu {
    background-color: #f9fafb; /* gray-50 */
    border-top: 1px solid #f3f4f6; /* gray-100 */
    display: none;
}

.modeo-mobile-nav-item[data-submenu-open="true"] .modeo-mobile-nav-submenu {
    display: block;
}

/* Mobile Nav Submenu Link */
.modeo-mobile-nav-submenu-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 2rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #374151; /* gray-700 */
    transition: color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.modeo-mobile-nav-submenu-link:hover {
    color: var(--primary);
    background-color: rgba(204, 22, 22, 0.05); /* primary/5 */
}

.modeo-mobile-nav-submenu-link span:first-child {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    color: var(--primary);
}

.modeo-mobile-nav-submenu-link .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Submenu Section Headings */
.modeo-mobile-nav-submenu h4 {
    padding: 0.5rem 2rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: #6b7280; /* gray-500 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.modeo-mobile-nav-submenu h4:not(:first-child) {
    padding-top: 1rem;
}

/* User Menu Mobile */
.modeo-user-menu-mobile {
    padding: 0.5rem 1rem;
}

.modeo-user-menu-mobile .flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151; /* gray-700 */
}

.modeo-user-menu-mobile img,
.modeo-user-menu-mobile > div > div:first-child {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    object-fit: cover;
}

.modeo-user-menu-mobile .font-medium {
    font-weight: 500;
}

.modeo-user-menu-mobile .mt-2 {
    margin-top: 0.5rem;
}

.modeo-user-menu-mobile .space-y-1 > * + * {
    margin-top: 0.25rem;
}

.modeo-user-menu-mobile a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #374151; /* gray-700 */
    transition: color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.modeo-user-menu-mobile a:hover {
    color: var(--primary);
    background-color: #f9fafb; /* gray-50 */
}

/* Account Section */
.modeo-mobile-nav .border-t {
    border-top: 1px solid #e5e7eb; /* gray-200 */
}

.modeo-mobile-nav .mt-4 {
    margin-top: 1rem;
}

.modeo-mobile-nav .pt-4 {
    padding-top: 1rem;
}

.modeo-mobile-nav .px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.modeo-mobile-nav .py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Utility Classes */
.flex-1 {
    flex: 1 1 0%;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.text-left {
    text-align: left;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-semibold {
    font-weight: 600;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.hover\:text-primary:hover {
    color: var(--primary);
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.hover\:bg-primary\/5:hover {
    background-color: rgba(204, 22, 22, 0.05);
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.bg-primary\/5 {
    background-color: rgba(204, 22, 22, 0.05);
}

.text-primary {
    color: var(--primary);
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.border-gray-100 {
    border-color: #f3f4f6;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.w-4 {
    width: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-8 {
    height: 2rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.rounded-full {
    border-radius: 9999px;
}

.object-cover {
    object-fit: cover;
}

.items-center {
    align-items: center;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}


