/* Shared merchant footer (views/layouts/common/footerBar.php). Class selectors so the landing stylesheet's bare
   `footer` / `footer a` rules cannot restyle it; the background comes from the tenant's FOOTER_BACKGROUND_COLOR. */

/* Sticky footer on the landing layouts: the footer sits at the bottom of the window and is pushed down by taller
   content (every merchant tenant uses this shared footer). The content offset clears the fixed header; it used to come by accident from the old footer's collapsed
   `margin-top: 100px`. min-height is overridden because the layout's inline 100vh and myscript.js's
   window-minus-160px guess would both push the footer below the fold. */
body.landing-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.landing-layout > .landing-content-container {
    flex: 1 0 auto;
    min-height: 0 !important;
    /* margin, not padding: the container's .n-p-l-r class zeroes all padding with !important. */
    margin-top: 100px;
}

/* Same for the logged-in portal layout. #middle-section already clears the fixed header with its own margin-top;
   its inline min-height and the layout script's window-minus-300px guess are overridden the same way. */
body.portal-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.portal-layout > #middle-section {
    flex: 1 0 auto;
    min-height: 0 !important;
}

.eg-footer-bar {
    clear: both;
    width: 100%;
    margin: 0;
    padding: 20px 15px 15px;
    background: #282828;
    color: #9fa0a0;
    font-size: 13px;
    text-align: center;
}

.eg-footer-bar__nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eg-footer-bar__nav li {
    display: inline-block;
    padding: 0 12px 10px;
}

.eg-footer-bar__nav a,
.eg-footer-bar__nav a:hover {
    color: #fff;
}

.eg-footer-bar__nav a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* One small box for every logo, whatever its shape, identical logged in and out (portal and landing
   stylesheets both load, so the selector is specific enough that neither can resize it). */
.eg-footer-bar .eg-footer-bar__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
}

.eg-footer-bar .eg-footer-bar__logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 140px;
    max-height: 28px;
    margin: 0 auto;
}

.eg-footer-bar__copyright {
    margin: 8px 0 0;
}

/* FOOTER_THEME = "light": tenants with a light FOOTER_BACKGROUND_COLOR (Global Payments). */
.eg-footer-bar--light {
    color: #555;
}

.eg-footer-bar--light .eg-footer-bar__nav a,
.eg-footer-bar--light .eg-footer-bar__nav a:hover {
    color: #333;
}

.eg-footer-bar--light .eg-footer-bar__nav a:focus-visible {
    outline-color: #333;
}

/* FOOTER_LOGO_BADGE: dark logo artwork (Worldpay, SpeedLine) on the dark bar. */
.eg-footer-bar .eg-footer-bar__logo--badge img {
    box-sizing: content-box;
    max-height: 20px;  /* + 4px padding top and bottom = the same 28px box */
    padding: 4px 10px;
    background: #fff;
    border-radius: 4px;
}

/* Visually hidden, still announced: tells screen-reader users the link opens a new tab. */
.eg-footer-bar__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
