.sg-banner
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    min-height: 60px;
    padding: 6px 12px 6px 8px;
    gap: 8px;
}

.sg-banner-left
{
    display: block;
    min-width: 180px;
    max-width: 480px;
    max-height: 80px;
    object-fit: contain;
    flex: 0 1 auto;
}

.sg-banner-left-default-logo
{
    position: relative;
    display: block;
    background: none;
    min-width: 180px;
    padding: 4px 0;
}

.sg-hac-logo-img
{
    display: block;
    height: 52px;
    width: auto;
    max-width: 320px;
}

.sg-banner-district-name
{
    position: absolute;
    bottom: 0;
    left: calc(16.4% + 4px);
    font-size: 0.8em;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(83.6% - 8px);
}

.sg-banner-text
{
    font-weight: bold;
    font-size: 1em;
}

.sg-banner-default-text-color
{
    color: #ffffff;
}

.sg-banner-right
{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
}

.sg-banner-right-default-logo
{
    background: url('../../Media/images/Banner/hac-default-banner-right.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
}

.sg-banner-menu-container
{
    display: flex;
    align-items: center;
}

.sg-banner-menu-left,
.sg-banner-menu-right
{
    width: 6px;
    flex: 0 0 6px;
}

.sg-banner-menu
{
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 32px;
    flex-wrap: nowrap;
}

.sg-banner-menu span
{
    text-decoration: none;
    display: block;
}

.sg-banner-menu li
{
    list-style-type: none;
    cursor: pointer;
}

.sg-banner-menu-element
{
    height: 32px;
    display: flex;
    align-items: center;
    position: relative;
}

.sg-banner-menu-element:hover > ul,
.sg-banner-menu-element:focus-within > ul,
.sg-menu-element-identity.sg-submenu-open > ul
{
    top: 100%;
    opacity: 1;
    pointer-events: auto;
}

.sg-banner-menu-element a,
.sg-banner-menu-element span
{
    text-decoration: none;
    color: #ffffff;
    display: block;
    padding: 6px 6px;
    white-space: nowrap;
}

.sg-menu-element-identity span
{
    font-weight: bold;
}

.sg-menu-element-notifications
{
    text-indent: 25px;
}

.sg-menu-element-uservoice a
{
    background: url('../../Media/images/Banner/uservoice.png') no-repeat 2px center;
    padding-left: 20px;
}

.sg-menu-element-help a
{
    background: url('../../Media/images/Banner/help-small.png') no-repeat 2px center;
    padding-left: 20px;
}

.sg-menu-element-logoff a
{
    background: url('../../Media/images/Banner/logon-logout-small.png') no-repeat 2px center;
    padding-left: 20px;
}

.sg-banner-menu-divider
{
    width: 1px;
    height: 20px;
    background-color: rgb(153, 153, 153);
    flex: 0 0 1px;
    align-self: center;
}

.sg-banner-submenu
{
    list-style-type: none;
    background-color: #000000;
    position: absolute;
    top: -9999px;
    left: 0;
    padding: 0;
    white-space: nowrap;
    box-shadow: 4px 4px 10px #999999;
    border: 2px solid #999999;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    min-width: 125px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
}

.sg-banner-submenu li { text-indent: .5em; }
.sg-banner-submenu li + li { border-top: 1px solid #999999; }
.sg-banner-submenu li:last-child { border-bottom: 0; }

.sg-banner-submenu li a:hover
{
    background-color: #444444;
}

.sg-banner-submenu li:last-child a:hover
{
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

.sg-banner-submenu li a
{
    color: #ffffff;
    display: block;
    font-weight: normal;
}

.sg-banner-chooser
{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px 4px;
    min-height: 24px;
}

.sg-banner-chooser button
{
    height: 24px;
    padding: 1px 6px;
}

.ui-dialog div.sg-student-picker
{
    margin: 0;
    padding: 0;
}

.sg-student-picker ~ .ui-dialog-buttonpane .ui-dialog-buttonset
{
    float: none;
}

.sg-student-picker ~ .ui-dialog-buttonpane .ui-dialog-buttonset .sg-cancel-submit-picker
{
    float: right;
}

.ui-dialog div.sg-footer-dialog
{
    white-space: pre-wrap;
}

.ui-button-text
{
    color: #0066a5;
}

div.sg-banner-chooser button.ui-button
{
    background-color: #ffffff;
    background-image: none !important;
}

.sg-add-change-student
{
    cursor: pointer;
}

.sg-banner-learning-location img
{
    background-color: #ffffff;
    vertical-align: middle;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
    margin-bottom: 2px;
}

.sg-mobile-menu-toggle
{
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.sg-hamburger-bar
{
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sg-mobile-menu-toggle[aria-expanded="true"] .sg-hamburger-bar:nth-child(1)
{
    transform: translateY(7px) rotate(45deg);
}

.sg-mobile-menu-toggle[aria-expanded="true"] .sg-hamburger-bar:nth-child(2)
{
    opacity: 0;
}

.sg-mobile-menu-toggle[aria-expanded="true"] .sg-hamburger-bar:nth-child(3)
{
    transform: translateY(-7px) rotate(-45deg);
}

.sg-mobile-user-bar
{
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    color: #ffffff;
    min-height: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sg-mobile-user-info
{
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.sg-mobile-user-name
{
    font-weight: bold;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-mobile-student-info
{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82em;
    opacity: 0.92;
}

.sg-mobile-student-info > span
{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-mobile-change-student-btn
{
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 3px;
    color: #ffffff;
    cursor: pointer;
    padding: 2px 7px;
    font-size: 0.85em;
    flex-shrink: 0;
}

.sg-mobile-change-student-btn:hover
{
    background: rgba(255, 255, 255, 0.15);
}

.sg-mobile-nav-backdrop
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 900;
    display: none;
}

.sg-mobile-nav-backdrop.sg-nav-open
{
    display: block;
}

.sg-mobile-nav-panel
{
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 86vw;
    height: 100%;
    background: #ffffff;
    z-index: 901;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -3px 0 18px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.sg-mobile-nav-panel.sg-nav-open
{
    transform: translateX(0);
}

body.sg-nav-panel-open
{
    overflow: hidden;
}

.sg-mobile-nav-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: #ffffff;
    flex-shrink: 0;
}

.sg-mobile-nav-header-title
{
    font-weight: bold;
    font-size: 1.05em;
    letter-spacing: 0.03em;
}

.sg-mobile-nav-close
{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.7em;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 3px;
}

.sg-mobile-nav-close:hover
{
    background: rgba(255, 255, 255, 0.2);
}

.sg-mobile-nav-user-section
{
    padding: 12px 14px;
    background: #f4f6fa;
    border-bottom: 1px solid #dde3ec;
    flex-shrink: 0;
}

.sg-mobile-nav-user-section .sg-mobile-user-name
{
    color: #222222;
}

.sg-mobile-nav-user-section .sg-mobile-student-info
{
    color: #444444;
    opacity: 1;
}

.sg-mobile-nav-user-section .sg-mobile-change-student-btn
{
    color: #00427c;
    border-color: #00427c;
    background: #ffffff;
}

.sg-mobile-nav-list
{
    flex: 1 1 auto;
    overflow-y: auto;
}

.sg-mobile-nav-entry
{
    border-bottom: 1px solid #ebebeb;
}

.sg-mobile-nav-main-link
{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #222222;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.1s;
}

.sg-mobile-nav-main-link:visited
{
    color: #222222;
}

.sg-mobile-nav-main-link:hover
{
    background: #f5f7fb;
    color: #00427c;
}

.sg-mobile-nav-entry-active > .sg-mobile-nav-main-link
{
    background: #eef2fb;
    border-left: 3px solid #00427c;
    padding-left: 13px;
    color: #00427c;
}

.sg-mobile-nav-sub-list
{
    background: #f9f9fb;
    border-top: 1px solid #e8e8e8;
}

.sg-mobile-nav-sub-link
{
    display: block;
    padding: 9px 16px 9px 52px;
    color: #444444;
    text-decoration: none;
    font-size: 0.93em;
    border-top: 1px solid #f0f0f0;
    transition: background 0.1s;
}

.sg-mobile-nav-sub-link:first-child
{
    border-top: none;
}

.sg-mobile-nav-sub-link:visited
{
    color: #444444;
}

.sg-mobile-nav-sub-link:hover
{
    background: #eef2fb;
    color: #00427c;
}

.sg-mobile-nav-sub-link-active
{
    background: #e8effd;
    color: #00427c;
    font-weight: 600;
    border-left: 3px solid #00427c;
    padding-left: 49px;
}

.sg-mobile-nav-external-icon
{
    margin-left: 6px;
    font-size: 0.8em;
    opacity: 0.7;
    vertical-align: middle;
}

.sg-mobile-nav-utils
{
    padding: 14px 16px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.sg-mobile-nav-util-btn
{
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: #f7f7f7;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 0.95em;
    color: #333333;
}

.sg-mobile-nav-util-btn:hover
{
    background: #eeeeee;
}

.sg-mobile-nav-util-link,
.sg-mobile-nav-util-link:visited
{
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    color: #333333;
}

.sg-mobile-nav-util-link:hover
{
    color: #333333;
}

.sg-mobile-nav-util-logoff
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #b00020;
    text-decoration: none;
    font-size: 0.95em;
    background: #fff5f5;
    border: 1px solid #f5c0c0;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}

.sg-mobile-nav-util-logoff:hover
{
    background: #ffe8e8;
    color: #800010;
}

@media (max-width: 767px)
{
    html.sg-hac-mobile-layout-enabled .sg-banner
    {
        padding: 6px 8px;
        min-height: 52px;
        gap: 0;
        flex-wrap: nowrap;
    }

    html.sg-hac-mobile-layout-enabled .sg-banner-left,
    html.sg-hac-mobile-layout-enabled .sg-banner-left-default-logo
    {
        min-width: 0;
        min-height: 40px;
        max-height: 52px;
        background-size: contain;
        flex: 1 1 auto;
        overflow: hidden;
    }

    /* Allow the logo image to scale down so the menu button is never pushed off screen. */
    html.sg-hac-mobile-layout-enabled .sg-hac-logo-img
    {
        max-width: 100%;
        height: auto;
        max-height: 52px;
    }

    html.sg-hac-mobile-layout-enabled .sg-banner-right
    {
        display: none;
    }

    html.sg-hac-mobile-layout-enabled .sg-mobile-menu-toggle
    {
        display: flex;
        margin-left: auto;
        flex-shrink: 0;
    }

    html.sg-hac-mobile-layout-enabled .sg-mobile-user-bar
    {
        display: flex;
    }
}
