﻿/* CrossSite.css (loaded before this file) sets body { min-width: 960px; overflow: auto }.
   HAC uses its own responsive frame shell, so reset those legacy constraints here. */
body
{
    min-width: 0;
    overflow: hidden;
}

:root
{
    --hac-main-content-min-width: 800px;
}

html
{
    overflow-x: hidden;
    max-width: 100%;
}

main#main-content
{
    overflow-x: hidden;
}

.sg-main-header
{
    width: 100%;
    display: table;
    position: fixed;
    top: 0;
    height: 175px;
    z-index: 100;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.sg-main-content
{
    position: fixed;
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
}

.sg-main-content-inner
{
    min-width: var(--hac-main-content-min-width);
    min-height: 100%;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Allow specific pages to be fully responsive by removing minimum width constraint */
.sg-main-content-inner.sg-mobile-ready
{
    min-width: 0;
}

.sg-main-footer
{
    position: fixed;
    bottom: 0;
    left: 0;
    color: #ffffff;
    width: 100%;
    overflow: hidden;
    height: 35px;
    min-height: 35px;
    display: flex;
    align-items: center;
    background-color: #00427c;
    z-index: 100;
    padding: 4px 12px;
    box-sizing: border-box;
}

@media (max-width: 767px)
{
    html.sg-hac-mobile-layout-enabled,
    html.sg-hac-mobile-ready-page,
    html.sg-hac-mobile-layout-enabled body,
    html.sg-hac-mobile-ready-page body
    {
        height: 100%;
        overflow-y: hidden;
    }

    html.sg-hac-mobile-layout-enabled main#main-content,
    html.sg-hac-mobile-ready-page main#main-content
    {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow-y: hidden;
    }

    html.sg-hac-mobile-layout-enabled .sg-main-header,
    html.sg-hac-mobile-ready-page .sg-main-header
    {
        position: relative;
        top: auto;
        height: auto;
        flex: 0 0 auto;
        width: 100%;
    }

    html.sg-hac-mobile-layout-enabled .sg-main-content,
    html.sg-hac-mobile-ready-page .sg-main-content
    {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        overflow-y: auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: static;
        left: auto;
        right: auto;
    }

    html.sg-hac-mobile-layout-enabled .sg-main-content-inner,
    html.sg-hac-mobile-ready-page .sg-main-content-inner
    {
        min-width: var(--hac-main-content-min-width);
    }

    html.sg-hac-mobile-ready-page .sg-main-content-inner.sg-mobile-ready
    {
        min-width: 0;
    }

    html.sg-hac-mobile-layout-enabled .sg-main-footer,
    html.sg-hac-mobile-ready-page .sg-main-footer
    {
        position: relative;
        bottom: auto;
        left: auto;
        height: auto;
        min-height: 40px;
        flex: 0 0 auto;
        width: 100%;
        flex-wrap: wrap;
        padding: 4px 8px;
        gap: 2px;
    }
}