/**
 * Site chrome — training/catalog compact header and fixes for legacy header markup.
 */

/* Legacy header: keep brand row on one line and constrain tenant logo */
header .subheader {
    overflow: hidden;
}

header .subheader-brand-row {
    flex-wrap: nowrap !important;
}

header .subheader-brand-row .branding-client-logo-wrap {
    margin-left: auto;
    max-width: 220px;
    overflow: hidden;
}

header .branding-client-logo {
    max-height: 36px !important;
    max-width: 180px !important;
    object-fit: contain;
    width: auto !important;
    height: auto !important;
}

header .mainheader {
    background: #f3a533 !important;
    background-color: #f3a533 !important;
}

header .mainheader-inner {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0 12px;
}

header .mainheader-inner > a {
    flex-shrink: 0;
}

header .mainheader-account {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    gap: 0 8px;
    margin-left: auto;
    position: static;
    right: auto;
}

header .mainheader-sep {
    margin: 0 4px;
}

header .mainheader-username {
    font-weight: 500;
    font-family: Roboto, sans-serif;
}

/* Compact training / catalog header */
.site-chrome {
    background: #fff;
    border-bottom: 3px solid #f3a533;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.site-chrome__brand {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px 20px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1120px;
    min-height: 64px;
    overflow: hidden;
    padding: 12px 24px 10px;
    width: 100%;
}

.site-chrome__brand-primary {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
}

.site-chrome__avitms-link {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

.site-chrome__avitms-logo {
    display: block;
    height: 40px;
    width: auto;
}

.site-chrome__tag {
    background: #f3a533;
    border-radius: 999px;
    color: #141414;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.11em;
    line-height: 1.2;
    padding: 6px 14px;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-chrome__client {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
    max-height: 48px;
    max-width: min(220px, 38vw);
    overflow: hidden;
    padding: 6px 12px;
}

.site-chrome__client-logo {
    display: block;
    height: auto;
    max-height: 36px;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.site-chrome__nav {
    align-items: center;
    background: #f3a533;
    box-sizing: border-box;
    color: #fff;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px 20px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1120px;
    min-height: 50px;
    padding: 0 24px;
    width: 100%;
}

.site-chrome__nav-links {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 4px 18px;
    min-width: 0;
    overflow: hidden;
}

.site-chrome__nav-links > a {
    align-items: center;
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 600;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.site-chrome__nav-links > a:hover {
    text-decoration: underline;
}

.site-chrome__nav-links > a i {
    font-size: 17px;
}

.site-chrome__nav-links > a p {
    color: inherit;
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    margin: 0;
}

.site-chrome__account {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.site-chrome__account a {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 600;
    gap: 8px;
    text-decoration: none;
}

.site-chrome__account a:hover {
    text-decoration: underline;
}

.site-chrome__sep {
    margin: 0 2px;
    opacity: 0.85;
}

.site-chrome__username {
    font-family: Roboto, sans-serif;
    font-weight: 500;
}

body.has-site-chrome header .subheader,
body.has-site-chrome header .mainheader {
    display: none;
}

body.has-site-chrome main {
    min-height: calc(100vh - 180px);
}

@media screen and (max-width: 760px) {
    .site-chrome__brand {
        flex-wrap: wrap;
        padding: 10px 16px 8px;
    }

    .site-chrome__client {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }

    .site-chrome__nav {
        flex-wrap: wrap;
        padding: 8px 16px 10px;
    }

    .site-chrome__nav-links {
        flex: 1 1 100%;
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .site-chrome__account {
        margin-left: auto;
    }
}
