/* Public header aligned with the AI landing visual language. */
.mm-public-header {
    --mm-public-header-height: 60px;
    --mm-public-header-bg: #020b18;
    --mm-public-header-border: rgba(48, 91, 139, .42);
    --mm-public-header-text: #f4f7fb;
    --mm-public-header-muted: #a6b3c7;
    --mm-public-header-icon: #8ea4bf;
    --mm-public-header-accent: #2e91ff;
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(2, 11, 24, .97);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
    backdrop-filter: blur(18px) saturate(125%);
}

.mm-public-header .mm-public-header__navbar {
    min-height: var(--mm-public-header-height);
    height: var(--mm-public-header-height);
    padding: 0;
    background:
        radial-gradient(circle at 48% -160%, rgba(31, 118, 255, .18), transparent 40%),
        var(--mm-public-header-bg);
    border-bottom: 1px solid var(--mm-public-header-border) !important;
}

.mm-public-header .mm-public-header__container {
    width: 100%;
    max-width: 1080px;
    min-height: var(--mm-public-header-height);
    margin-inline: auto;
    padding-inline: 1rem;
}

/*
 * The current PNG wordmark has generous transparent padding around the artwork.
 * Keep a compact header footprint, but zoom the image inside a clipped viewport so
 * the visible logo has the same visual weight as the navigation beside it.
 */
.mm-public-header .brand-logo--header {
    display: flex;
    flex: 0 0 250px;
    width: 250px;
    height: 52px;
    align-items: center;
    justify-content: center;
    margin-right: 2.4rem;
    overflow: hidden;
}

.mm-public-header .brand-logo--header .brand-logo__image {
    width: 228px;
    height: 42px;
    max-width: none;
    object-fit: contain;
    object-position: center;
    transform: scale(3.15);
    transform-origin: center;
    filter: drop-shadow(0 0 14px rgba(27, 131, 255, .05));
}

.mm-public-header .mm-public-header__collapse {
    align-items: center;
    min-width: 0;
    height: 100%;
}

.mm-public-header .mm-public-header__navigation {
    display: flex;
    align-items: center;
    gap: .15rem;
    min-width: 0;
    height: 100%;
}

.mm-public-header .mm-main-navigation,
.mm-public-header .mm-operational-navigation,
.mm-public-header .mm-public-header__resources-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .18rem;
    margin: 0;
    padding: 0;
}

.mm-public-header .nav-item {
    display: flex;
    align-items: center;
    height: 100%;
}

.mm-public-header .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .48rem;
    min-height: 36px;
    padding: .45rem .68rem;
    border: 0;
    border-radius: .55rem;
    color: var(--mm-public-header-text);
    background: transparent;
    font-size: .72rem;
    font-weight: 520;
    line-height: 1;
    letter-spacing: -.005em;
    white-space: nowrap;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.mm-public-header .nav-link .mm-header-nav-icon {
    width: 1rem;
    color: var(--mm-public-header-icon);
    font-size: .84rem;
    line-height: 1;
    text-align: center;
    transition: color .16s ease, transform .16s ease;
}

.mm-public-header .nav-link:hover,
.mm-public-header .nav-link:focus-visible,
.mm-public-header .nav-link.active,
.mm-public-header .nav-link.show {
    color: #fff;
    background: rgba(28, 74, 126, .18);
    text-decoration: none;
}

.mm-public-header .nav-link:hover .mm-header-nav-icon,
.mm-public-header .nav-link:focus-visible .mm-header-nav-icon,
.mm-public-header .nav-link.active .mm-header-nav-icon,
.mm-public-header .nav-link.show .mm-header-nav-icon {
    color: #8ec8ff;
}

.mm-public-header .nav-link.active::after {
    content: "";
    position: absolute;
    right: .72rem;
    bottom: -.75rem;
    left: .72rem;
    height: 1px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, rgba(47, 151, 255, .82), transparent);
    box-shadow: 0 0 8px rgba(47, 151, 255, .38);
}

.mm-public-header .nav-link:focus-visible {
    outline: 2px solid rgba(63, 157, 255, .46);
    outline-offset: 1px;
}

.mm-public-header .dropdown-toggle::after {
    margin-left: .08rem;
    border-width: .24em .24em 0;
    color: #8192aa;
    vertical-align: middle;
}

.mm-public-header .mm-public-header__resources-menu {
    min-width: 188px;
    margin-top: .45rem;
    padding: .42rem;
    border: 1px solid rgba(61, 105, 157, .42);
    border-radius: .7rem;
    background: linear-gradient(180deg, rgba(7, 20, 38, .985), rgba(4, 14, 28, .99));
    box-shadow: 0 18px 46px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .025);
    backdrop-filter: blur(18px);
}

.mm-public-header .mm-public-header__resources-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 34px;
    padding: .46rem .62rem;
    border-radius: .48rem;
    color: #c7d2e0;
    font-size: .73rem;
}

.mm-public-header .mm-public-header__resources-menu .dropdown-item i {
    width: 1rem;
    color: #8099b8;
    text-align: center;
}

.mm-public-header .mm-public-header__resources-menu .dropdown-item:hover,
.mm-public-header .mm-public-header__resources-menu .dropdown-item:focus,
.mm-public-header .mm-public-header__resources-menu .dropdown-item.active {
    color: #fff;
    background: rgba(31, 124, 229, .16);
}

.mm-public-header .mm-public-header__resources-menu .dropdown-item.active i {
    color: #59adff;
}

.mm-public-header .mm-public-header__account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .8rem;
    min-width: 0;
    margin-left: auto;
}

.mm-public-header .mm-user-menu {
    min-width: 0;
}

.mm-public-header .mm-user-menu-trigger {
    gap: .48rem;
    min-height: 38px;
    padding: .24rem .42rem .24rem .24rem;
    border: 1px solid transparent;
    border-radius: .7rem;
    color: #f3f6fb;
    background: transparent;
    font-size: .71rem;
    font-weight: 560;
}

.mm-public-header .mm-user-menu-trigger:hover,
.mm-public-header .mm-user-menu-trigger:focus-visible,
.mm-public-header .mm-user-menu-trigger.show {
    border-color: rgba(51, 103, 164, .24);
    background: rgba(28, 67, 112, .16);
}

.mm-public-header .mm-user-menu-trigger::after {
    margin-left: .12rem;
    border-width: .24em .24em 0;
    color: #8c9db4;
}

.mm-public-header .mm-avatar-trigger,
.mm-public-header .mm-avatar,
.mm-public-header .mm-avatar-img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.mm-public-header .mm-avatar {
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(132, 168, 255, .24);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #4f69ff, #3454e8);
    box-shadow: 0 0 16px rgba(72, 94, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .18);
    font-size: .68rem;
    font-weight: 700;
}

.mm-public-header .mm-avatar-img {
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(112, 161, 255, .30);
}

.mm-public-header .mm-user-menu-name {
    max-width: 10rem;
    color: #f1f5fa;
}

.mm-public-header .mm-user-menu .dropdown-menu {
    margin-top: .45rem;
    border-color: rgba(61, 105, 157, .42);
    background: linear-gradient(180deg, rgba(7, 20, 38, .985), rgba(4, 14, 28, .99));
    box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
}

.mm-public-header .mm-mastering-notifications {
    display: flex;
    align-items: center;
}

.mm-public-header .mm-mastering-bell {
    display: grid;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(72, 117, 176, .44);
    border-radius: 50%;
    color: #8fa6c5;
    background: rgba(7, 22, 43, .84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.mm-public-header .mm-mastering-bell:hover,
.mm-public-header .mm-mastering-bell:focus-visible {
    color: #dbeaff;
    border-color: rgba(76, 153, 242, .62);
    background: rgba(12, 40, 75, .94);
    box-shadow: 0 0 18px rgba(31, 125, 229, .10), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.mm-public-header .mm-mastering-bell i {
    font-size: .8rem;
}

.mm-public-header .btn.btn-sm {
    min-height: 34px;
    padding: .42rem .78rem;
    border-radius: .55rem;
    font-size: .72rem;
}

.mm-public-header .mm-public-header__toggler {
    width: 38px;
    height: 38px;
    padding: .42rem;
    border: 1px solid rgba(71, 120, 179, .42);
    border-radius: .6rem;
    box-shadow: none;
}

@media (max-width: 1199.98px) {
    .mm-public-header {
        --mm-public-header-height: 64px;
    }

    .mm-public-header .mm-public-header__navbar {
        height: auto;
        min-height: var(--mm-public-header-height);
    }

    .mm-public-header .mm-public-header__container {
        position: relative;
        min-height: var(--mm-public-header-height);
    }

    .mm-public-header .brand-logo--header {
        flex-basis: 220px;
        width: 220px;
        height: 50px;
        margin-right: 1rem;
    }

    .mm-public-header .brand-logo--header .brand-logo__image {
        width: 205px;
        height: 40px;
        transform: scale(2.9);
    }

    .mm-public-header .mm-public-header__collapse {
        position: absolute;
        top: calc(100% + 1px);
        right: 1rem;
        left: 1rem;
        height: auto;
        padding: .8rem;
        border: 1px solid rgba(57, 103, 157, .45);
        border-top: 0;
        border-radius: 0 0 .9rem .9rem;
        background: rgba(3, 13, 27, .985);
        box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
        backdrop-filter: blur(18px);
    }

    .mm-public-header .mm-public-header__navigation,
    .mm-public-header .mm-main-navigation,
    .mm-public-header .mm-operational-navigation,
    .mm-public-header .mm-public-header__resources-nav {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .mm-public-header .nav-item,
    .mm-public-header .nav-link {
        width: 100%;
    }

    .mm-public-header .nav-link {
        justify-content: flex-start;
        min-height: 40px;
        padding-inline: .72rem;
    }

    .mm-public-header .nav-link.active::after {
        top: .55rem;
        right: auto;
        bottom: .55rem;
        left: 0;
        width: 2px;
        height: auto;
        background: #369bff;
    }

    .mm-public-header .mm-public-header__resources-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin: .25rem 0 .4rem;
        box-shadow: none;
    }

    .mm-public-header .mm-public-header__account {
        justify-content: flex-start;
        width: 100%;
        margin-top: .65rem;
        padding: .72rem .18rem .05rem;
        border-top: 1px solid rgba(55, 96, 143, .32);
    }
}

@media (max-width: 575.98px) {
    .mm-public-header .mm-public-header__container {
        padding-inline: .75rem;
    }

    .mm-public-header .brand-logo--header {
        flex-basis: 190px;
        width: 190px;
        height: 46px;
    }

    .mm-public-header .brand-logo--header .brand-logo__image {
        width: 174px;
        height: 36px;
        transform: scale(2.6);
    }

    .mm-public-header .mm-public-header__collapse {
        right: .75rem;
        left: .75rem;
    }

    .mm-public-header .mm-user-menu-name {
        position: static;
        width: auto;
        height: auto;
        max-width: 9rem;
        overflow: hidden;
        clip-path: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mm-public-header .nav-link,
    .mm-public-header .mm-header-nav-icon,
    .mm-public-header .mm-mastering-bell {
        transition: none;
    }
}
