/* Shared navigation enhancements (mobile hamburger + off-canvas panel)
   This repo uses per-page inline CSS; this file is meant to be INCLUDED by each page.
*/

/* Hamburger button (hidden on desktop) */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.nav-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 111, 234, 0.12);
    border-color: #7f6fea;
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

/* Off-canvas menu overlay/panel */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;

    /* must remain below signup walls (they use z-index: 1000) */
    z-index: 900;
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(360px, 88vw);
    background: #ffffff;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    padding: 18px;
    overflow-y: auto;
}

body.nav-open {
    overflow: hidden;
}

body.nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.nav-open .mobile-nav-panel {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mobile-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.mobile-nav-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 111, 234, 0.12);
    border-color: #7f6fea;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.mobile-nav-links a,
.mobile-nav-links button {
    width: 100%;
    text-align: left;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-nav-links a:hover,
.mobile-nav-links button:hover {
    background: #f8f7ff;
    color: #7f6fea;
}

.mobile-nav-links button {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-submenu {
    margin-left: 8px;
    border-left: 2px solid #f0f0f0;
    padding-left: 10px;
}

.mobile-submenu a {
    font-size: 15px;
    font-weight: 600;
}

mobile-nav-auth {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eeeeee;
}

.mobile-nav-auth .auth-btn,
.mobile-nav-auth .logout-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
}

/* On mobile, hide the desktop nav links + desktop auth and show the hamburger */
@media (max-width: 768px) {
    .nav-container {
        gap: 12px;
    }

    .nav-logo img {
        height: 34px;
    }

    .nav-center {
        display: none !important;
    }

    .nav-auth {
        display: none !important;
    }

    .nav-toggle {
        display: inline-flex;
    }
}
