﻿/* Move down content because we have a fixed navbar that is 50px tall */
body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .jumbotron {
        margin-top: 20px;
    }
    .body-content {
        padding: 0;
    }
}

/* Language selector and modal styles moved from inline in master pages */
.lang-selector-section {
    margin-left: 16px;
    display: inline-block;
    vertical-align: middle;
}
.lang-selector-label {
    display: inline-block;
    margin-right: 8px;
}
.lang-selector-select {
    padding: 4px;
}

/* Modal overlay */
.lang-modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}
.lang-modal-dialog {
    background: #fff;
    max-width: 480px;
    margin: 10% auto;
    padding: 16px;
    border-radius: 6px;
}
.lang-modal-buttons {
    text-align: right;
    margin-top: 16px;
}
.lang-modal .btn { margin-left: 8px; }
.lang-modal .btn:first-child { margin-left: 0; margin-right: 8px; }

/* Mobile selector container */
.lang-selector-mobile {
    margin-top: 8px;
    margin-bottom: 8px;
}
.lang-selector-mobile .lang-selector-select { padding:4px; }

/* Styles moved from Site.master to central CSS */
html, body {
    margin: 0;
}
body {
    font-family: "Microsoft Sans Serif", sans-serif;
    font-size: 11pt;
    background-color: #ffffff;
    color: #000000;
}
header#top, nav#menu, section#page, footer#bottom {
    margin-left: 5%;
    margin-right: 5%;
}
header#top {
    background-color: #ffffff;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}
img#logo {
    padding-top: 24px;
    padding-bottom: 24px;
    padding-left: 32px;
    padding-right: 16px;
    height: 100px;
}
h1#site {
    padding-right: 32px;
    margin: 0;
    text-align: left;
}
section#brand {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}
nav#menu {
    padding-left: 16px;
    padding-right: 16px;
    background-color: #000000;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
}
section.account {
    text-align: right;
}
section.account > b {
    font-size: x-large;
}
section.account > span {
    font-size: large;
}
section.account a {
    color: #111111;
    text-decoration: none;
}
section.account a:hover {
    color: #000000;
    text-decoration: underline;
}
section#page {
    padding-top: 24px;
    padding-bottom: 24px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}
main#contents {
    padding-left: 36px;
    padding-right: 36px;
    width: 100%;
}
main#contents > p {
    line-height: 1.6;
}
div.box {
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 8px 16px;
    border: 1px solid #918f8e;
    background: #c0b7b5;
    background: linear-gradient(#c0b7b5, white);
}
footer#bottom {
    text-align: center;
    border-top: 1px solid #000000;
    font-size: 10pt;
}
h1#page {
    margin: 0 0 24px 0;
    text-align: left;
}
a.menulink {
    color: #eeeeee;
    text-decoration: none;
    margin: 8px 16px;
    display: inline-block;
}
a.menulink:hover {
    color: #ffffff;
    text-decoration: underline;
}
*.textonly {
    display: none;
}
@media only screen and (min-width: 1215px) {
    body {
        font-size: 12pt;
    }
    header#top, nav#menu, section#page, footer#bottom {
        margin-left: 10%;
        margin-right: 10%;
    }
    footer#bottom {
        font-size: 11pt;
    }
}
@media only screen and (min-width: 1536px) {
    header#top, nav#menu, section#page, footer#bottom {
        margin-left: 15%;
        margin-right: 15%;
    }
}

/* Mobile-specific overrides: keep desktop layout visual while remaining usable on small screens */
@media only screen and (max-width: 767px) {
    header#top {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 3%;
    }
    section#brand {
        width: 100%;
        padding: 0 0 8px 0;
        align-items: center;
    }
    img#logo {
        height: 60px;
        padding: 8px 8px;
        max-width: 140px;
        object-fit: contain;
    }
    h1#site {
        padding-right: 8px;
        font-size: 1.25rem;
        line-height: 1.1;
        margin-top: 0;
    }
    nav#menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 8px 3%;
    }
    a.menulink {
        margin: 6px 8px;
        font-size: 0.95rem;
    }
    section.account {
        text-align: left;
        margin-top: 6px;
    }
    main#contents {
        padding-left: 12px;
        padding-right: 12px;
    }
    header#top, nav#menu, section#page, footer#bottom {
        margin-left: 3%;
        margin-right: 3%;
    }
    body {
        padding-top: 20px;
        font-size: 11pt;
    }
    .body-content {
        padding-left: 8px;
        padding-right: 8px;
    }
    .lang-selector-mobile { margin-top: 6px; margin-bottom: 6px; }
}

/* CSS moved from Site.Mobile.master <style> block */
:root { --page-h-padding: 12px; }
html, body { box-sizing: border-box; max-width: 100%; overflow-x: hidden; }
*, *:before, *:after { box-sizing: inherit; }

/* Make images and media responsive; ensure logo never exceeds viewport width */
img, video, iframe, embed { max-width: 100%; height: auto; display: block; }
#logo { max-width: 100vw; width: auto; height: auto; display: block; margin: 0 auto; }

/* Ensure full-width structural elements use the same left/right padding and border rules */
header, nav#menu, section#page, footer, form#form1, main#contents {
    padding-left: var(--page-h-padding);
    padding-right: var(--page-h-padding);
    box-sizing: border-box;
    border-left: none;
    border-right: none;
}

/* Keep the visible content area aligned with structural padding */
.content-wrapper, #contents { padding-left: var(--page-h-padding); padding-right: var(--page-h-padding); }

/* Menu and lang selector sizing */
.mobile-menu-select { width: 100%; max-width: 100%; box-sizing: border-box; }
.lang-selector-section, .lang-selector-mobile { width: 100%; box-sizing: border-box; padding-left: 0; padding-right: 0; }

/* Avoid long text creating horizontal scroll */
.content-wrapper, #contents { word-wrap: break-word; overflow-wrap: break-word; }

/* Allow nav to scroll horizontally only if necessary */
nav#menu { -webkit-overflow-scrolling: touch; overflow-x: auto; }

/* Footer login area styling: align with page padding */
.mobile-login { padding-top: 10px; border-top: 1px solid #e5e5e5; text-align: center; padding-left: 0; padding-right: 0; }
.mobile-login .menulink, .mobile-login a { display: inline-block; margin: 0 8px; word-break: break-word; }

/* Make horizontal rules fit the same padding box */
hr.textonly { margin-left: var(--page-h-padding); margin-right: var(--page-h-padding); }
