/**
 * HVAC Community Events Mobile Navigation
 * 
 * This stylesheet provides an enhanced mobile navigation experience
 * for the dashboard and other main pages of the HVAC Community Events plugin.
 */

/* Mobile Navigation Container */
.hvac-mobile-nav-container {
    display: none; /* Hidden by default, shows on mobile */
}

/* Responsive nav toggle button */
.hvac-mobile-nav-toggle {
    display: none;
    background-color: var(--hvac-primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--hvac-border-radius);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    width: 100%;
    margin-bottom: var(--hvac-spacing-md);
    position: relative;
    padding-left: 40px;
    font-size: 1rem;
}

.hvac-mobile-nav-toggle::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 2px;
    background-color: white;
    box-shadow: 0 -5px 0 0 white, 0 5px 0 0 white;
    transition: all 0.3s ease;
}

.hvac-mobile-nav-toggle.active::before {
    box-shadow: none;
    transform: translateY(-50%) rotate(45deg);
}

.hvac-mobile-nav-toggle.active::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 18px;
    height: 2px;
    background-color: white;
    transform: translateY(-50%) rotate(-45deg);
}

/* Mobile navigation menu */
.hvac-mobile-nav {
    display: none;
    background-color: white;
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
    overflow: hidden;
    box-shadow: var(--hvac-shadow);
    margin-bottom: var(--hvac-spacing-lg);
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.hvac-mobile-nav.open {
    display: block;
    max-height: 500px;
    opacity: 1;
}

.hvac-mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hvac-mobile-nav li {
    border-bottom: 1px solid var(--hvac-border-light);
}

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

.hvac-mobile-nav a {
    display: block;
    padding: var(--hvac-spacing-md);
    text-decoration: none;
    color: var(--hvac-text);
    font-weight: 500;
    transition: background-color 0.2s;
}

.hvac-mobile-nav a:hover,
.hvac-mobile-nav a:focus {
    background-color: var(--hvac-primary-light);
    color: var(--hvac-primary);
}

.hvac-mobile-nav a.active {
    background-color: var(--hvac-primary);
    color: white;
}

/* Mobile nav icon indicator */
.hvac-mobile-nav a i,
.hvac-mobile-nav a svg {
    margin-right: var(--hvac-spacing-sm);
    width: 16px;
    text-align: center;
}

/* Apply to screens smaller than 768px */
@media (max-width: 767px) {
    /* Hide original navigation */
    .hvac-dashboard-nav,
    .hvac-event-summary-actions,
    .hvac-email-navigation {
        display: none;
    }
    
    /* Show mobile navigation components */
    .hvac-mobile-nav-container {
        display: block;
    }
    
    .hvac-mobile-nav-toggle {
        display: block;
    }
    
    /* Adjust header spacing */
    .hvac-dashboard-header,
    .hvac-event-summary-header,
    .hvac-email-header {
        margin-bottom: var(--hvac-spacing-md);
        padding-bottom: var(--hvac-spacing-sm);
    }
}

/* Slide-out navigation for larger mobile screens */
@media (min-width: 480px) and (max-width: 767px) {
    .hvac-mobile-nav {
        position: relative;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        max-height: none;
        opacity: 1;
    }
    
    .hvac-mobile-nav.open {
        transform: translateX(0);
    }
}