/* ===================================================================== */
/* =                           Navigation Bar                          = */
/* ===================================================================== */

nav {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: var(--colour-dark);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    width: calc(100% - 1rem);
    max-width: calc(800px - 1rem);
    height: auto;
    min-height: 4.5em;
    box-shadow: 0px 6px 8px rgba(0,0,0,0.5);
    z-index: 2000;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.navicon {
    font-size: 2rem;
    vertical-align: middle;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.navicon:hover {
    color: var(--colour-accent);
    transform: scale(1.1);
}

.navleft a {
    display: flex;
    align-items: center;
    min-width: 0;
}

.navright {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.clublogo {
    width: 3rem;
    height: 3rem;
    vertical-align: middle;
    border-radius: 0.25rem;
    flex-shrink: 0;
    object-fit: contain;
}

.username {
    font-size: 1.25rem;
    margin-left: 0.25rem;
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.2em;
    max-height: 2.4em;
}

/* === Theme Toggle Icon === */

.theme-toggle {
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
    height: 100%;
}

.theme-toggle .navicon {
    font-size: 2rem;
    line-height: 1;
    margin: 0 0.5rem;
}

@media screen and (max-width: 400px) {
    .theme-toggle .navicon { font-size: 1.5rem; }
}

/* === Mobile === */

@media screen and (max-width: 400px) {

    nav {
        padding: 0.5rem 0.75rem;
        min-height: 3.5em;
    }

    .username {
        font-size: 1rem;
    }

    .clublogo {
        width: 2rem;
        height: 2rem;
        vertical-align: middle;
        border-radius: 0.25rem;
        object-fit: contain;
    }

    .navicon {
        font-size: 1.5rem;
        vertical-align: middle;
        border-radius: 0.25rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        cursor: pointer;
        transition: color 0.3s ease, transform 0.3s ease;
    }

}

@media screen and (max-width: 300px) {

    .username {
        display: none;
    }
    
}
