.navbar-brand {
    color: var(--brand-color);
    font-weight: 500;
    font-size: 1.4rem;
}

.navbar-brand:hover {
    cursor: pointer;
    text-decoration: none;
}

.nav-item {
    padding-right: 10px;
}

.nav-item .nav-link {
    font-weight: 700;
}

.nav-link:hover:focus {
  text-decoration: none;
}

/* Scoped portal component styles. */
#portal-profile-header {
    display: block;
    padding: 16px 0;
    margin: 0;
    border-bottom: 1px solid var(--portal-border);
    background: var(--portal-white);
    color: var(--portal-ink);
}

#portal-profile-header > .container-fluid {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0;
    gap: 16px;
}

#portal-profile-header .navbar-brand {
    flex-shrink: 0;
    margin: 0 24px 0 0;
    padding: 0;
}

#portal-profile-header .navbar-brand img {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
    max-height: 64px;
    object-fit: contain;
}

#portal-profile-header .navbar-nav {
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
}

#portal-profile-header .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 13px;
    border-radius: 7px;
    color: var(--portal-nav-text);
    text-decoration: none;
    white-space: nowrap;
}

#portal-profile-header .nav-link:hover, #portal-profile-header .nav-link.show {
    color: var(--portal-primary-hover);
    background: var(--portal-nav-hover);
}

#portal-profile-header .navbar-nav > .nav-item:last-child {
    margin-left: 10px;
}

#portal-profile-header .navbar-nav > .nav-item:last-child > .nav-link {
    border: 1px solid var(--portal-nav-border);
    padding-left: 18px;
    padding-right: 18px;
    color: var(--portal-link);
}

#portal-profile-header .dropdown-toggle::after {
    margin-left: 2px;
}

#portal-profile-header .dropdown-menu {
    min-width: 260px;
    max-width: calc(100vw - 40px);
    padding: 8px;
    margin-top: 10px;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(20,44,70,.12);
}

#portal-profile-header .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 5px;
    color: var(--portal-nav-text);
    text-decoration: none;
    white-space: normal;
}

#portal-profile-header .dropdown-item:hover, #portal-profile-header .dropdown-item:focus {
    color: var(--portal-primary-hover);
    background: var(--portal-nav-hover);
}

#portal-profile-header .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-height: 44px;
    margin-left: auto;
    padding: 8px;
    border: 1px solid var(--portal-nav-border);
    border-radius: 8px;
    background: var(--portal-surface);
    color: var(--portal-link);
}

#portal-profile-header .navbar-toggler:hover {
    background: var(--portal-tint);
}

#portal-profile-header .navbar-toggler-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c559b' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
}

@media (min-width: 1200px) {
    #portal-profile-header .navbar-toggler {
        display: none;
    }
}

@media (max-width: 1199px) {
    #portal-profile-header > .container-fluid {
        gap: 0;
    }
}

@media (max-width: 1199px) {
    #portal-profile-header .navbar-collapse {
        border-top: 1px solid var(--portal-nav-divider);
        margin-top: 14px;
    }
}

@media (max-width: 1199px) {
    #portal-profile-header .navbar-nav {
        align-items: stretch;
        gap: 4px;
        padding-top: 12px;
    }
}

@media (max-width: 1199px) {
    #portal-profile-header .nav-link {
        padding: 11px 14px;
    }
}

@media (max-width: 1199px) {
    #portal-profile-header .navbar-nav > .nav-item:last-child {
        margin: 8px 0 0;
        padding-top: 12px;
        border-top: 1px solid var(--portal-nav-divider);
    }
}

@media (max-width: 1199px) {
    #portal-profile-header .navbar-nav > .nav-item:last-child > .nav-link {
        width: fit-content;
    }
}

@media (max-width: 1199px) {
    #portal-profile-header .dropdown-menu {
        min-width: 0;
        max-width: none;
        margin: 4px 0 8px;
        box-shadow: none;
        background: var(--portal-surface);
    }
}

@media (max-width: 575px) {
    #portal-profile-header {
        padding: 12px 0;
    }
}

@media (max-width: 575px) {
    #portal-profile-header > .container-fluid {
        width: calc(100% - 32px);
    }
}

@media (max-width: 575px) {
    #portal-profile-header .navbar-brand {
        margin-right: 12px;
    }
}

@media (max-width: 575px) {
    #portal-profile-header .navbar-brand img {
        width: 185px;
    }
}
