/* Header styles for top bar */
.header {
    display: flex;
    align-items: center;
    padding: 10px 0;
    height: 64px;
    width: 100%;
    box-sizing: border-box;
    /* Make header a positioned container so the menu anchors to it, not the viewport */
    position: relative;
}

.header .nav-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 6px;
}

.nav-logo {
    height: 36px;
    margin-right: 10px;
}

.nav-path {
    display: block;
    padding-top: 2px;
    color: var(--text);
    font-size: 20px;
    font-family: "Livvic Regular", sans-serif;
    align-items: center;
    margin: 0;
}

/* Breadcrumbs */
.crumb {
    color: var(--text);
    opacity: 0.85;
}
.crumb:hover {
    opacity: 1;
}
.crumb-active {
    color: var(--text);
    font-weight: 600;
    opacity: 1;
}
.crumb-sep {
    color: var(--muted-2);
    opacity: 0.6;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 6px;
}

.username {
    color: var(--text);
    font-size: 16px;
    font-family: "Livvic Regular", sans-serif;
    margin-right: 10px;
}

.profile-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

/* small adjustments on mobile */
@media (max-width: 768px) {
    .nav-path {
        font-size: 16px;
    }
    .profile-pic {
        width: 36px;
        height: 36px;
    }
}

/* logout button */
.btn-logout {
    background: transparent;
    border: 1px solid var(--input-border);
    color: var(--muted-2);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-logout:hover {
    background: var(--overlay-bg);
}

/* Overflow menu button (replaces direct logout) */
.header-overflow-button {
    margin-left: 8px;
    background: transparent;
    border: 1px solid var(--input-border);
    color: var(--muted-2);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.header-overflow-button:hover {
    background: var(--overlay-bg);
}

.header-menu {
    position: absolute;
    right: 10px;
    /* Place menu just below the header regardless of header height */
    top: 100%;
    margin-top: 8px;
    min-width: 200px;
    background: var(--menu-dropdown-bg);
    border: 1px solid var(--input-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    padding: 6px 0;
}

.header-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 10px 12px;
    cursor: pointer;
    font-family: "Livvic Regular", sans-serif;
}

.header-menu-item:hover {
    background: var(--overlay-bg);
}
