/**
 * Global Menu Styles for Morse Trainer Pro
 * Professional navigation styling that works across all pages
 */

.morse-logo {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    color: #60a5fa;
    padding: 8px 12px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-radius: 8px;
    border: 1px solid #4b5563;
    display: inline-block;
}

.professional-header {
    background: linear-gradient(135deg, #1f2937, #111827);
    border-bottom: 2px solid #374151;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    border-radius: 1px;
}

/* Dropdown container improvements for better usability */
.relative {
    position: relative;
}

/* Dropdown menu positioning - remove gap between button and menu */
.relative > div[id$="DropdownMenu"] {
    margin-top: 0px !important; /* Remove gap that causes dropdown to close */
    padding-top: 8px; /* Add padding inside menu instead */
}

/* Dropdown menu hover states */
.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #374151;
    transform: translateX(2px);
}

/* Animation for dropdown appearance */
.dropdown-menu {
    transform-origin: top center;
    animation: fadeInDown 0.2s ease-out;
}

/* Improved dropdown hover area */
.relative:hover > div[id$="DropdownMenu"] {
    pointer-events: auto;
}

/* Make sure dropdown links are clickable */
.relative div[id$="DropdownMenu"] a {
    display: block;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .professional-header {
        padding: 1rem;
    }
    
    .professional-header .container {
        padding: 1rem;
    }
    
    .professional-header nav {
        flex-direction: column;
        space-x: 0;
        gap: 0.5rem;
    }
    
    .dropdown-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        width: auto;
        transform: none;
    }
    
    .morse-logo {
        font-size: 14px;
        padding: 6px 10px;
    }
}

/* Focus states for accessibility */
.nav-link:focus,
button:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Loading state for menu items */
.nav-link.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Active state for current page */
.nav-link.active {
    color: #60a5fa !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    border-radius: 1px;
}