/**
 * HVAC Trainer Navigation Styles
 *
 * @package HVAC_Community_Events
 * @version 2.0.0
 */

/* Navigation Container */
.hvac-trainer-nav {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
    z-index: 100;
}

/* Horizontal Navigation */
.hvac-trainer-nav-horizontal .hvac-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hvac-trainer-nav-horizontal .hvac-nav-item {
    position: relative;
}

.hvac-trainer-nav-horizontal .hvac-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hvac-trainer-nav-horizontal .hvac-nav-link:hover {
    background-color: #e9ecef;
    color: #0274be;
}

.hvac-trainer-nav-horizontal .hvac-nav-active > .hvac-nav-link {
    background-color: #0274be;
    color: white;
}

/* Vertical Navigation */
.hvac-trainer-nav-vertical {
    width: 260px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    min-height: 100vh;
}

.hvac-trainer-nav-vertical .hvac-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hvac-trainer-nav-vertical .hvac-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.hvac-trainer-nav-vertical .hvac-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hvac-trainer-nav-vertical .hvac-nav-link:hover {
    background-color: #f8f9fa;
    color: #0274be;
    padding-left: 2rem;
}

.hvac-trainer-nav-vertical .hvac-nav-active > .hvac-nav-link {
    background-color: #e3f2fd;
    color: #0274be;
    border-left: 4px solid #0274be;
}

/* Icons */
.hvac-nav-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.hvac-nav-arrow {
    margin-left: auto;
    font-size: 14px !important;
    transition: transform 0.3s ease;
}

.hvac-nav-has-submenu:hover .hvac-nav-arrow,
.hvac-nav-has-submenu.hvac-nav-open .hvac-nav-arrow {
    transform: rotate(180deg);
}

/* Submenu */
.hvac-nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
}

/* Horizontal Submenu */
.hvac-trainer-nav-horizontal .hvac-nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 4px 4px;
}

.hvac-trainer-nav-horizontal .hvac-nav-has-submenu:hover .hvac-nav-submenu,
.hvac-trainer-nav-horizontal[data-submenu="always"] .hvac-nav-submenu {
    display: block;
}

/* Vertical Submenu */
.hvac-trainer-nav-vertical .hvac-nav-submenu {
    position: static;
    box-shadow: none;
    background-color: #f8f9fa;
}

.hvac-trainer-nav-vertical .hvac-nav-has-submenu:hover .hvac-nav-submenu,
.hvac-trainer-nav-vertical .hvac-nav-has-submenu.hvac-nav-open .hvac-nav-submenu,
.hvac-trainer-nav-vertical[data-submenu="always"] .hvac-nav-submenu {
    display: block;
}

/* Submenu Items */
.hvac-nav-subitem {
    border-bottom: 1px solid #f0f0f0;
}

.hvac-nav-subitem:last-child {
    border-bottom: none;
}

.hvac-nav-sublink {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hvac-trainer-nav-vertical .hvac-nav-sublink {
    padding-left: 3rem;
}

.hvac-nav-sublink:hover {
    background-color: #f8f9fa;
    color: #0274be;
}

.hvac-nav-subitem.hvac-nav-active .hvac-nav-sublink {
    color: #0274be;
    font-weight: 600;
}

/* Mobile Navigation */
.hvac-nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hvac-nav-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    position: relative;
    transition: background-color 0.3s ease;
}

.hvac-nav-toggle-icon::before,
.hvac-nav-toggle-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
}

.hvac-nav-toggle-icon::before {
    top: -8px;
}

.hvac-nav-toggle-icon::after {
    top: 8px;
}

.hvac-nav-mobile-open .hvac-nav-toggle-icon {
    background-color: transparent;
}

.hvac-nav-mobile-open .hvac-nav-toggle-icon::before {
    transform: rotate(45deg) translateY(8px);
}

.hvac-nav-mobile-open .hvac-nav-toggle-icon::after {
    transform: rotate(-45deg) translateY(-8px);
}

/* Responsive */
@media (max-width: 768px) {
    .hvac-nav-mobile-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 101;
    }
    
    .hvac-trainer-nav-horizontal .hvac-nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .hvac-nav-mobile-open .hvac-nav-menu {
        display: flex;
    }
    
    .hvac-trainer-nav-horizontal .hvac-nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .hvac-trainer-nav-horizontal .hvac-nav-submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #f8f9fa;
        border: none;
        border-radius: 0;
    }
    
    .hvac-trainer-nav-horizontal .hvac-nav-sublink {
        padding-left: 3rem;
    }
    
    .hvac-trainer-nav-vertical {
        position: fixed;
        top: 0;
        left: -260px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .hvac-nav-mobile-open .hvac-trainer-nav-vertical {
        left: 0;
    }
}

/* Integration with existing styles */
.hvac-page-wrapper {
    padding-top: 0;
}

.hvac-trainer-nav + .hvac-page-wrapper {
    padding-top: 2rem;
}

/* Active state improvements */
.hvac-nav-active > .hvac-nav-link .dashicons {
    color: inherit;
}

/* Accessibility */
.hvac-nav-link:focus,
.hvac-nav-sublink:focus {
    outline: 2px solid #0274be;
    outline-offset: 2px;
}

/* Loading state */
.hvac-nav-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Dropdown animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hvac-nav-submenu {
    animation: slideDown 0.3s ease;
}

/* Click behavior for submenu */
.hvac-trainer-nav[data-submenu="click"] .hvac-nav-has-submenu:hover .hvac-nav-submenu {
    display: none;
}

.hvac-trainer-nav[data-submenu="click"] .hvac-nav-has-submenu.hvac-nav-open .hvac-nav-submenu {
    display: block;
}