/*
    Global resets
*/
html, body {
    margin: 0;
    border: 0;
    padding: 0;
    background: #fff;
    color: #000;
    font-size: 100%;
    line-height: 1.5rem;
}

/*
    Typography
*/
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5rem;
    padding: 0;
    color: #00568D; /* "Homeland Security Blue" */
    /* There is no native font stack for serif fonts, so come up with something close to such here */
    font-family: 'Merriweather', 'Joanna MT', 'Nimbus Roman', 'Nimbus Roman No9 L', 'Nimbus Roman No 9 L', 'Liberation Serif', FreeSerif, 'DejaVu Serif', 'Hoefler Text', Times, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.6rem;
}

h1 {
    font-size: 2.2rem;
    line-height: 1.3rem;
}

h2 {
    font-size: 1.65rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin: 0 0 1rem;
}

caption {
    color: #555;
    font-style: italic;
}

pre, code, kbd, samp, tt {
    font-size: 1rem;
    line-height: 1.5;
}

pre {
    border: 1px solid #5B5C5E; /* Homeland Security Dark Gray */
    border-radius: 4px;
    background-color: rgb(171 173 176 / 25%); /* "Homeland Security Gray" at 25% */
    display: block;
    padding: 5px;
    margin: 5px 0;
}

figure {
    margin: 0;
    border: 1px solid #5B5C5E; /* Homeland Security Dark Gray */
    padding: 1rem;
    background: rgb(171 173 176 / 25%); /* "Homeland Security Gray" at 25% */
    color: #000;
    inline-size: 450px;
}

code {
    white-space: pre-wrap;
}

.help {
    z-index: 1;
    position: relative;
    cursor: help;
}

span.info {
    text-decoration: underline dotted;
}

svg.info {
    padding: 0.1rem 0;
    vertical-align: middle;
    width: 0.9rem;
    height: 0.9rem;
}

/*
    Throbber/spinner/loader/whatever
*/
.loader {
    position: fixed;
    z-index: 9999;
    top: calc(50% - 55px);
    left: calc(50% - 55px);
    width: 110px;
    height: 110px;
    animation: loader-spin 1s linear infinite;
    border-radius: 50%;
    background: conic-gradient(transparent 0deg, #f5854c 270deg);
    --mask: radial-gradient(farthest-side, transparent 75%, black 75%);
    -webkit-mask: var(--mask);
    mask: var(--mask);
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*
    Tables
*/
.hover {
    z-index: 1;
    position: relative;
    cursor: pointer;
}

tr.hover:hover {
    border-radius: 0.125rem;
    box-shadow: 0 0 0.125rem 0.125rem rgb(0 120 169 / 15%); /* Light shade of "Homeland Security Light Blue" */
}

#filters svg {
    margin-top: -0.25rem;
    padding-right: 0.5rem;
    width: 2rem;
    height: 2rem;
}

/*
    Structure
*/
header, footer {
    max-width: 100%;
    display: block;
    clear: both;
}

header {
    background: #fff url(/assets/images/background-header.png) repeat-x;
}

footer {
    background: #fff url(/assets/images/footer_trim_background.png) repeat-x center 40px;
}

#back-matter {
    background: url(/assets/images/footer_logo_wash.png) no-repeat center top;
    margin-top: 3rem;
}

.container {
    max-width: 1422px;
    margin-left: auto;
    margin-right: auto;
    width: auto;
    display: block;
    clear: both;
}

.card {
    min-height: 256px;
}

img {
    max-width: 100%;
    height: auto !important;
}

.fact-sheet-icon {
    width: 150px;
    height: 150px;
}

.root-page-heading {
    margin: 0;
    width: 100%;
    height: 25rem;
    background-image: url(/assets/images/header-stadium.png);
    background-size: cover;
    display: flex;
    align-content: center;
}

.root-page-title {
    margin: auto 6rem;
    border-radius: 2rem;
    padding: 2rem;
    background-color: #fff;
    flex-basis: 40%;
    flex-grow: 0.25;
}

.root-page-title h1 {
    line-height: 1.1em;
}

legend {
    font-size: 1.25rem;
    float: none;
    padding: inherit;
}

#subdivision-select {
    padding-bottom: 0.5rem;
}

#map-container {
    padding-bottom: calc(100% * 0.5625); /* 16 x 9 */
    width: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
}

/*
    Generic Links
*/
a {
    text-decoration: underline;
}

a:link {
    color: #00568D; /* "Homeland Security Blue" */
}

a:visited {
    color: purple;
}

a:hover, a:active {
    color: #0078A9; /* "Homeland Security Light Blue" */
}

/*
    Glyph Icons
*/
.glyph-container {
    margin: 0;
    border: none;
    padding: 0;
    display: inline-block;
}

.glyph {
    margin: 0;
    background: #00568D; /* "Homeland Security Blue" */
    color: #fff;
    display: inline-block;
    position: relative;
}

.glyph svg {
    margin: 0;
    border: none;
    padding: 0;
    background: #00568D; /* "Homeland Security Blue" */
    color: #fff;
}

#branding-nav .glyph-container {
    width: 32px;
    height: 32px;
}

#branding-nav .glyph {
    border-radius: 16px;
    padding: 8px;
    width: 32px;
    height: 32px;
}

#branding-nav .glyph:hover, #branding-nav .glyph:hover svg {
    background: #0078A9; /* "Homeland Security Light Blue" */
}

#branding-nav svg {
    margin-top: -12px;
    width: 16px;
    height: 16px;
}

.identity.shift-left svg {
    margin-left: -30%;
}

.identity.shift-right svg {
    margin-left: 15%;
}

.card .glyph-container {
    width: 128px;
    height: 128px;
}

.card .glyph {
    border-radius: 64px;
    padding: 32px;
    width: 128px;
    height: 128px;
}

.card svg {
    margin-top: 0;
    width: 64px;
    height: 64px;
}

svg.empty-list-icon {
    margin-bottom: 50px;
    width: 150px;
    height: 150px;
    background: inherit;
    color: #eee;
}

/*
    Forms, Validation, and Message Queue Notifications
*/
::backdrop {
    background-color: black;
    opacity: 0.5;
}

.modal-content textarea {
    resize: vertical;
}

.form-floating input:disabled + label,
.form-floating select:disabled + label {
    background: inherit;
    color: #ABADB0; /* "Homeland Security Gray" */
}

#review-user-group {
    padding-bottom: 1rem;
}

form.validate input:placeholder-shown:not([type=submit]) {
    background: none;
}

#password-requirements dl {
    margin: 1rem 0 0 0;
    padding: 0;
    filter: brightness(115%);
}

#password-requirements dd {
    margin: 0 0 0 1.25rem;
    padding: 0;
    display: list-item;
}

.strike {
    font-style: italic;
    filter: brightness(125%);
    text-decoration: line-through;
}

#messages {
    position: fixed;
    width: 100%;
    z-index: 9999;
}

.alert {
    margin: 1rem;
    width: calc(100% - 2rem);
    display: flex;
    flex-direction: row;
    opacity: 1;
    animation: alert 4s forwards;
}

input.valid {
    background: url('/assets/images/check-circle-fill.svg') no-repeat right 1rem center;
    background-size: 1.5rem;
}

input.invalid {
    background: url('/assets/images/x-octagon-fill.svg') no-repeat right 1rem center;
    background-size: 1.5rem;
}

.alert-success,
input.valid {
    background-color: #A9CA99; /* Light tint of "Homeland Security Green" */
    color: #213B14; /* Dark shade of "Homeland Security Green" */
}

.alert-danger,
input.invalid {
    background-color: #E5ABAF; /* Light tint of "Homeland Security Red" */
    color: #4C1216; /* Dark shade of "Homeland Security Red" */
}

@keyframes alert {
    0%, 100% {
        opacity: 0;
    }

    20%, 80% {
        opacity: 0.9;
    }
}

/*
    Announcements
*/
#announcements {
    position: relative;
}

#announcements .announcement {
    position: absolute;
    padding: 0 2rem;
    visibility: hidden;
    opacity: 0;
}

#announcements .announcement.show {
    visibility: visible;
    opacity: 1;
    animation: announcement 6s forwards;
}

#announcements .announcement.single {
    visibility: visible;
    opacity: 1;
}

.header-color {
    color: #00568D; /* "Homeland Security Blue" */
    font-weight: bold;
}

@keyframes announcement {
    0%, 100% {
        opacity: 0;
    }

    10%, 90% {
        opacity: 1;
    }
}

/*
    Top Bar
*/
#top-bar {
    margin: 0;
    color: #666;
    height: 23px;
    font-size: 11px;
    line-height: 20px;
}

#tagline img {
    margin-right: 5px;
    width: 21px;
    height: 13px;
}

#top-bar-nav {
    margin: 0;
    padding: 0;
    text-align: right;
}

#top-bar-nav ul li {
    margin: 0;
    border: 0;
    padding: 0;
    display: inline;
    list-style: none;
}

#top-bar-nav ul li:not(:last-child) {
    margin-right: 10px;
    border-right: 1px solid silver;
    padding-right: 10px;
}

#top-bar-nav ul li a {
    text-decoration: none;
}

/*
    Branding
*/
#branding {
    max-height: 145px;
}

#branding-name, #branding-nav {
    height: 140px;
}

#branding-name {
    margin-top: 5px;
    width: 275px;
}

#branding-name a {
    position: relative;
    display: inline-block;
    z-index: 1;
}

#logo {
    margin-right: 1rem;
    position: relative;
    display: inline-block;
    width: 100px;
    height: 100px;
    float: left;
}

#logo object {
    position: relative;
    z-index: -1;
}

#site-name {
    width: 175px;
    display: inline;
    float: left;
}

#site-name h1 {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.75rem;
}

#site-name h2 {
    font-size: 1.2rem;
    line-height: 1.5rem;
}

#site-name hr {
    margin: 0;
    border: none;
    height: 2px;
    color: #00568D; /* "Homeland Security Blue" */
}

#branding-nav {
    margin-top: calc(140px + 2.2rem);
}

#branding-nav li {
    text-align: right;
    display: inline;
    list-style: none;
}

#branding-nav li:not(:last-child) {
    margin: 0 13px 0 0;
    padding: 0 13px 0 0;
}

#branding-nav ul li a {
    border: 0;
    text-decoration: none;
}

/*
    Primary Header Nav
*/
#primary-header-nav {
    margin: 0.5rem 0 1.5rem;
    padding: 5px 0;
    min-height: 40px;
}

#primary-header-nav nav ul {
    margin: 0;
    padding: 0;
}

#primary-header-nav nav ul li {
    margin: 0;
    padding: 2px 0;
    display: inline;
    list-style: none;
}

#primary-header-nav nav ul li:not(:last-child) {
    margin-right: 20px;
    border-right: 1px solid silver;
    padding-right: 20px;
}

#primary-header-nav form {
    margin-right: 0;
    padding-right: 0;
}

#primary-header-nav .form-control, #primary-header-nav .form-select {
    width: auto;
    display: inline-block;
}

/*
    Breadcrumb Nav
*/
#vertical-space {
    display: block;
    height: 1.5rem;
    margin-bottom: 1rem;
}

#breadcrumb {
    --bs-breadcrumb-divider: '\00BB';
}

#breadcrumb ol > li:first-child a {
    color: #6C757D;
    display: inline-block;
    margin-left: 0;
    height: 1rem;
    width: 1rem;
}

#breadcrumb ol > li:first-child a:hover, #breadcrumb ol > li:first-child a:active {
    color: #0078A9; /* "Homeland Security Light Blue" */
}

/*
    Primary Footer Nav
*/
#primary-footer-nav {
    padding-top: 5.5rem;
}

#primary-footer-nav ul {
    display: flex;
    flex-direction: row;
}

#primary-footer-nav ul li {
    margin: 0;
    padding: 0;
    text-align: center;
    display: inline;
    flex: 1;
    list-style: none;
}

#primary-footer-nav ul li:first-child {
    text-align: left;
}

#primary-footer-nav ul li:nth-child(3), #primary-footer-nav ul li:nth-child(4) {
    flex: 2;
}

#primary-footer-nav ul li:last-child {
    text-align: right;
}

#primary-footer-nav ul li a {
    color: #222;
    text-decoration: none;
}

/*
    Secondary Footer Nav
*/
#secondary-footer-nav {
    padding-top: 3rem;
    padding-bottom: 0.5rem;
    text-align: center;
}

#secondary-footer-nav ul li {
    margin: 0;
    padding: 0 10px;
    display: inline;
    list-style: none;
}

#secondary-footer-nav ul li a {
    text-decoration: underline;
    font-size: 16px;
}

/* 
    Accessibility 
    See:
        - https://www.section508.gov/
        - https://www.access-board.gov/ict/
        - https://www.w3.org/WAI/standards-guidelines/wcag/
*/
.btn-accessible {
    transition: all .15s ease-in-out;
}

.btn-accessible.btn-primary, .btn-accessible.btn-primary:link, .btn-accessible.btn-primary:visited {
    border: none;
    background-color: #00568D; /* "Homeland Security Blue" */
    color: #fff;
    box-shadow: none;
}

.btn-accessible.btn-primary:hover, .btn-accessible.btn-primary:focus, .btn-accessible.btn-primary:active, .btn-accessible.btn-primary:active:focus {
    background-color: #00568D; /* "Homeland Security Blue" */
    color: #fff;
    filter: brightness(120%);
    box-shadow: 0 0 0 0.25rem rgb(0 120 169 / 25%); /* "Homeland Security Light Blue" */
}

.btn-accessible.btn-secondary, .btn-accessible.btn-secondary:link, .btn-accessible.btn-secondary:visited {
    border: none;
    background-color: #5B5C5E; /* "Homeland Security Dark Gray" */
    color: #fff;
    box-shadow: none;
}

.btn-accessible.btn-secondary:hover, .btn-accessible.btn-secondary:focus, .btn-accessible.btn-secondary:active, .btn-accessible.btn-secondary:active:focus {
    background-color: #5B5C5E; /* "Homeland Security Dark Gray" */
    color: #fff;
    filter: brightness(120%);
    box-shadow: 0 0 0 0.25rem rgb(171 173 176 / 25%); /* "Homeland Security Gray" at 25% */
}

#skip a, #skip a:link, #skip a:visited, #skip a:hover {
    width: 1px;
    height: 1px;
    position: absolute;
    left: -10000px;
    top: auto;
    overflow: hidden;
}

#skip a:active, #skip a:focus {
    width: auto;
    height: auto;
    position: static;
}

.element-invisible {
    width: 1px;
    height: 1px;
    position: absolute !important;
    clip: rect(1px 1px 1px 1px); /* IE 6/7 */
    clip: rect(1px, 1px, 1px, 1px);
    overflow: hidden;
    white-space: nowrap;
}

.element-invisible .element-focusable:active, .element-invisible .element-focusable:focus {
    width: auto;
    height: auto;
    position: static !important;
    clip: auto;
    overflow: visible;
}

/*
    Help-doc styling
*/
details.helpDetails {
    padding-top: 50px;
}

details.helpDetails.examples {
    padding-top: 10px;
}

details.helpDetails * {
    margin-top: 10px;
    margin-left: 10px;
}

.helpdoc-link {
    text-decoration: none;
}

/*
    Temporary Status Banner (remove after delivery)
*/
#status {
    margin: 0;
    border: 0;
    padding: 0;
    width: 100%;
    height: 1.5rem;
    background: green;
    color: white;
    font-size: 1rem;
    line-height: 1.25rem;
    text-align: center;
}
