/* Navigation Component Styles */

.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(79, 156, 249, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

/* Dev Mode Toggle Button Styles */
.dev-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    font-size: 20px;
    border: none;
    animation: subtle-pulse 2s infinite;
}

.dev-mode-toggle[data-mode="off"] {
    background: #6b7280;
}

.dev-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 4px 6px rgba(0, 0, 0, 0.1);
}

.dev-mode-toggle:active {
    transform: scale(0.95);
}

@keyframes subtle-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Dev mode indicator for nav items */
.nav-item .dev-item {
    opacity: 0.8;
    position: relative;
}

.nav-item .dev-item:after {
    content: " 🚧";
    font-size: 0.8em;
    vertical-align: super;
    opacity: 0.6;
}

/* Mobile responsive adjustments for dev toggle */
@media (max-width: 768px) {
    .dev-mode-toggle {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

.logo:hover {
    color: #3a80d2;
    background-color: rgba(79, 156, 249, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 156, 249, 0.15);
}

.logo:hover::before {
    left: 100%;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-item a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.nav-item a:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-item a.active {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.06);
}

.has-megamenu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.megamenu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    min-width: 400px;
    z-index: 100;
    border: 1px solid #eaeaea;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    pointer-events: none;
}

.megamenu-panel.open {
    display: grid;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.megamenu-column h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.megamenu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-column li {
    margin-bottom: 0.5rem;
}

.megamenu-column a {
    font-weight: 400;
    font-size: 0.95rem;
    display: block;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    margin: 0.1rem 0;
    transition: background-color 0.15s ease;
}

.megamenu-column a:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.login:hover {
    background-color: #3a80d2;
}

.logout {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid #ddd;
}

.logout:hover {
    background-color: #f5f5f5;
}

.nav-loading {
    color: #888;
    font-size: 0.9rem;
}

/* Mobile hamburger menu */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    transition: color 0.2s ease;
    z-index: 1001;
}

.nav-toggle:hover {
    color: var(--primary-color);
}

.nav-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive nav styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: block !important;
    }

    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }

    .navbar .nav-content .nav-links {
        position: fixed !important;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        width: 100%;
        margin-top: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 999;
        display: flex !important;
    }

    .navbar .nav-content .nav-links.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .megamenu-panel {
        position: static;
        grid-template-columns: 1fr;
        min-width: unset;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        margin: 0;
        padding: 0.5rem 1rem;
        transform: none;
        opacity: 1;
        background-color: #f8f8f8;
    }

    .has-megamenu {
        width: 100%;
    }

    .megamenu-panel.open {
        margin-top: 0;
        background-color: #f8f8f8;
    }

    .navbar .nav-content .nav-links .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .navbar .nav-content .nav-links .nav-item:last-child {
        border-bottom: none;
    }

    .navbar .nav-content .nav-links .nav-item a {
        display: block !important;
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .navbar .nav-content .nav-links .nav-actions {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        border-top: 1px solid #eee;
        margin-top: 0.25rem;
        display: flex !important;
    }

    .megamenu-column {
        margin-bottom: 0.75rem;
    }

    .megamenu-column:last-child {
        margin-bottom: 0;
    }

    .megamenu-column h4 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .megamenu-column a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Smaller mobile screens */
@media (max-width: 480px) {
    .nav-content {
        padding: 0.5rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
        padding: 0.2rem 0.4rem;
    }

    .nav-links {
        top: 60px;
        max-height: calc(100vh - 60px);
    }

    .nav-item a {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .megamenu-panel {
        padding: 0.5rem;
    }
}
