/* ==========================================
   MOBILE MENU ANIMATIONS & STYLES
   ========================================== */

/* Mobile menu slide animation */
#mobileMenu {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

/* When menu is open */
#mobileMenu:not(.translate-x-full) {
	transform: translateX(0);
}

/* Prevent layout shift when scrollbar is hidden */
body.mobile-menu-open {
	overflow: hidden !important;
}

/* Ensure smooth transition for body and header */
body,
header {
	transition: padding-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile menu backdrop blur effect */
#mobileMenu > div:first-child {
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: opacity 0.3s ease-in-out;
}

/* Mobile menu panel */
#mobileMenu > div:nth-child(2) {
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
	background: rgba(15, 23, 42, 0.85);
	border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Mobile menu icon animation */
#mobileMenuIcon {
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation section styling */
.mobile-nav-section {
	padding: 1rem;
}

/* Section headers */
.mobile-section-header {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 0.75rem;
	padding: 0 0.75rem;
}

/* Navigation links styling */
.mobile-nav-item {
	display: flex;
	align-items: center;
	padding: 0.875rem 0.75rem;
	margin-bottom: 0.25rem;
	border-radius: 0.75rem;
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.mobile-nav-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 1);
	transform: translateX(2px);
}

.mobile-nav-item svg {
	margin-right: 0.75rem;
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

/* Settings buttons */
.mobile-settings-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.875rem 0.75rem;
	margin-bottom: 0.25rem;
	border-radius: 0.75rem;
	color: rgba(255, 255, 255, 0.8);
	background: none;
	border: none;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-settings-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 1);
}

/* Submenu styling */
.mobile-submenu {
	padding-left: 2rem;
	margin-top: 0.5rem;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-submenu:not(.hidden) {
	max-height: 200px;
	opacity: 1;
}

.mobile-submenu-item {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 0.625rem 0.75rem;
	margin-bottom: 0.125rem;
	border-radius: 0.5rem;
	color: rgba(255, 255, 255, 0.7);
	background: none;
	border: none;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-submenu-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.9);
}

.mobile-submenu-item svg {
	margin-right: 0.5rem;
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

/* Arrow animations */
.mobile-arrow {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logout section - now removed from bottom */
.mobile-logout-section {
	display: none; /* Hidden since logout is now in header */
}

.mobile-logout-btn {
	display: none; /* Hidden since logout is now in header */
}

/* New prominent logout button */
.mobile-logout-prominent {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.875rem 1rem;
	border-radius: 0.75rem;
	color: rgba(255, 255, 255, 0.9);
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.3);
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	font-weight: 500;
}

.mobile-logout-prominent:hover {
	background: rgba(239, 68, 68, 0.25);
	color: rgba(255, 255, 255, 1);
	border-color: rgba(239, 68, 68, 0.4);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.mobile-logout-prominent:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.mobile-logout-prominent svg {
	transition: transform 0.2s ease;
}

.mobile-logout-prominent:hover svg {
	transform: translateX(2px);
}

/* Remove old logout styles */
.mobile-menu-header-logout {
	display: none;
}

/* Footer section styling */
.mobile-footer-section {
	padding: 1rem;
	text-align: center;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: auto;
}

.mobile-footer-section span {
	display: inline-block;
	padding: 0.5rem;
}

/* Smooth scrolling for mobile menu */
#mobileMenu .overflow-y-auto {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#mobileMenu .overflow-y-auto::-webkit-scrollbar {
	width: 3px;
}

#mobileMenu .overflow-y-auto::-webkit-scrollbar-track {
	background: transparent;
}

#mobileMenu .overflow-y-auto::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
}

#mobileMenu .overflow-y-auto::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 480px) {
	#mobileMenu > div:nth-child(2) {
		width: 100vw;
		max-width: none;
	}
}

/* Focus states for accessibility */
#mobileMenu button:focus,
#mobileMenu a:focus {
	outline: 2px solid rgba(59, 130, 246, 0.6);
	outline-offset: 2px;
}

/* Active/current page indicators */
.mobile-nav-active {
	background: rgba(59, 130, 246, 0.2) !important;
	color: rgba(255, 255, 255, 1) !important;
	position: relative;
}

.mobile-nav-active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 60%;
	background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
	border-radius: 0 2px 2px 0;
}

/* Animation for menu opening */
@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}

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

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}
