﻿/* Navigation - Responsive sidebar (desktop) and bottom bar (mobile) */

.navigation {
    z-index: 1000;
    background-color: white;
}

/* Logo styles */
.nav-logo {
    display: none;
    border-bottom: 1px solid #e5e7eb;
}

.nav-logo a {
    display: block;
    padding: 20px;
    text-align: center;
}

.nav-logo img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nav-logo-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.nav-logo-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    flex: 1;
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 4px;
}

.nav-link:hover,
.nav-link:focus {
    color: #ff8c42;
    text-decoration: none;
}

.nav-link.active {
    color: #ff8c42;
    background-color: #fff5ef;
    border-radius: 10px;
}

.nav-link i:first-child {
    font-size: 1.25rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Section styles */
.nav-section {
    list-style: none;
    margin-top: 8px;
    padding: 0 12px;
}

.nav-section-title {
    display: flex;
    align-items: center;
    padding: 16px 12px 8px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section-title i {
    display: none;
}

.nav-section-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-subitem {
    margin: 2px 0;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 12px;
    transition: all 0.2s ease;
    border-radius: 10px;
}

.nav-sublink:hover,
.nav-sublink:focus {
    color: #ff8c42;
    background-color: #f3f4f6;
    text-decoration: none;
}

.nav-sublink.active {
    color: #ff8c42;
    background-color: #fff5ef;
}

.nav-sublink i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: inherit;
}

/* Badge for notifications */
.nav-badge {
    margin-left: auto;
    background-color: #ff8c42;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* User profile section */
.nav-user {
    display: none;
}

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 12px 16px 20px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    flex: 1;
    min-width: 0;
}

.nav-user-link:hover {
    background-color: #f3f4f6;
    text-decoration: none;
}

.nav-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ff8c42;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-user-avatar i {
    font-size: 1.2rem;
    color: #ffffff;
}

.nav-user-initials {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-email {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logout button in nav-user */
.nav-logout-form {
    flex-shrink: 0;
    padding-right: 12px;
}

.nav-logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Mobile: Bottom bar with 4 items */
@media (max-width: 767.98px) {
    .navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }

    /* Logo hidden on mobile */
    .nav-logo {
        display: none;
    }

    /* User hidden on mobile */
    .nav-user {
        display: none;
    }

    /* Show mobile nav, hide desktop nav */
    .nav-list-mobile {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px;
    }

    .nav-list-desktop {
        display: none;
    }

    .nav-item {
        flex: 1;
    }

    .nav-link {
        padding: 8px;
        border-radius: 12px;
        margin: 0 2px;
    }

    .nav-link.active {
        background-color: #fff5ef;
    }

    .nav-link i:first-child {
        font-size: 1.25rem;
    }

    .nav-label {
        font-size: 0.65rem;
        margin-top: 2px;
    }
}

/* Desktop: Left sidebar */
@media (min-width: 768px) {
    .navigation {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        border-right: 1px solid #e5e7eb;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    /* Show logo on desktop */
    .nav-logo {
        display: block;
    }

    /* Show user on desktop */
    .nav-user {
        display: flex;
        align-items: center;
        margin-top: auto;
        border-top: 1px solid #e5e7eb;
    }

    /* Hide mobile nav, show desktop nav */
    .nav-list-mobile {
        display: none;
    }

    .nav-list-desktop {
        display: flex;
        flex-direction: column;
        padding: 0 12px;
        flex: 1;
    }

    .nav-item {
        flex: 0 0 auto;
        margin: 2px 0;
    }

    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 12px;
        gap: 12px;
        border-radius: 10px;
    }

    .nav-link i:first-child {
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
    }

    .nav-label {
        font-size: 0.875rem;
        font-weight: 500;
        margin-top: 0;
    }

    .nav-link:hover {
        background-color: #f3f4f6;
    }

    /* Section styles for desktop */
    .nav-section {
        margin-top: 8px;
        padding: 0;
    }

    .nav-section-title {
        padding: 20px 12px 8px;
    }

    .nav-sublink {
        padding: 10px 12px;
    }

    /* Adjust main content to account for sidebar */
    body:not(.public) {
        padding-left: 260px;
        padding-bottom: 0;
    }
}

/* Large desktop: Wider sidebar */
@media (min-width: 1400px) {
    .navigation {
        width: 280px;
    }

    body:not(.public) {
        padding-left: 280px;
    }
}
