/**
 * Unified Menu Component Styles
 * Consistent navigation styling across all pages
 */

/* Header Styles */
.unified-header {
    position: relative;
    z-index: 20;
    background-color: #1f2937;
    border-bottom: 1px solid #374151;
}

/* Navigation Links */
.nav-link {
    color: #d1d5db;
    transition: color 0.2s;
    text-decoration: none;
}

.nav-link:hover {
    color: #818cf8;
}

.nav-link.active {
    color: #818cf8;
    font-weight: 500;
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    background-color: #1f2937;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.mobile-menu-close:hover {
    color: #ffffff;
}

.mobile-menu-content {
    padding: 1rem 0;
}

.mobile-menu-link {
    display: block;
    padding: 0.875rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.mobile-menu-link:hover {
    background-color: #374151;
    color: #818cf8;
}

.mobile-menu-link.active {
    color: #818cf8;
    background-color: rgba(129, 140, 248, 0.1);
}

/* Mobile Auth Info */
.mobile-auth-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

/* Hamburger Menu Icon */
.hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: currentColor;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-icon.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .unified-header .container {
        padding: 0 1rem;
    }
}

/* Auth Section Styles */
.unified-header .nav-link + .flex {
    border-left: 1px solid #374151;
    padding-left: 1.5rem;
}

/* Logo Styles */
.unified-header a[href="/"] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.unified-header a[href="/"] img {
    height: 2.5rem;
    width: auto;
}

/* Container Styles */
.unified-header .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Flexbox Utilities */
.unified-header .flex {
    display: flex;
}

.unified-header .justify-between {
    justify-content: space-between;
}

.unified-header .items-center {
    align-items: center;
}

.unified-header .space-x-3 > * + * {
    margin-left: 0.75rem;
}

.unified-header .space-x-4 > * + * {
    margin-left: 1rem;
}

.unified-header .space-x-6 > * + * {
    margin-left: 1.5rem;
}

/* Typography */
.unified-header .text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.unified-header .font-bold {
    font-weight: 700;
}

.unified-header .text-indigo-400 {
    color: #818cf8;
}

.unified-header .text-gray-300 {
    color: #d1d5db;
}

.unified-header .text-gray-400 {
    color: #9ca3af;
}

.unified-header .text-red-400 {
    color: #f87171;
}

.unified-header .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Hover States */
.unified-header .hover\:opacity-80:hover {
    opacity: 0.8;
}

.unified-header .hover\:text-indigo-400:hover {
    color: #818cf8;
}

.unified-header .hover\:text-red-300:hover {
    color: #fca5a5;
}

/* Transitions */
.unified-header .transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.unified-header .transition-colors {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus States */
.unified-header .focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Responsive Visibility */
@media (min-width: 768px) {
    .unified-header .md\:flex {
        display: flex;
    }
    
    .unified-header .md\:hidden {
        display: none;
    }
}

@media (max-width: 767px) {
    .unified-header .hidden {
        display: none;
    }
}

/* Padding */
.unified-header .py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.unified-header .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.unified-header .p-2 {
    padding: 0.5rem;
}

.unified-header .ml-6 {
    margin-left: 1.5rem;
}

/* Fix for body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}