﻿/* ==================================================================
   Base
   ================================================================== */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    font-family: Verdana, sans-serif;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100vh;
    /* Fallback color for very old browsers */
    background: #0a4c6e;
    /* Actual gradient */
    background: linear-gradient(135deg, #081d2f 0%, #0a4c6e 45%, #0e91a5 100%);
    background-attachment: fixed; /* nice parallax-style effect */
}

/* Shared focus ring style to match theme */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #258cfb;
}

/* Keep the page from shifting sideways due to wide content */
/*html, body {
    overflow-x: hidden;
}*/

/* ==================================================================
   Security bar (CUI)
   ================================================================== */

:root {
    --cui-height: 22px;
}

.security-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: var(--cui-height);
    z-index: 9999;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.security-bar--prod {
    background: green;
    color: #fff;
}

.security-bar--warning {
    background: #7f1d1d;
    color: #fff;
}

/* ==================================================================
   Utility bits
   ================================================================== */

.flag-icon {
    width: 1rem;
    height: auto;
}

table code {
    color: inherit;
    background-color: transparent;
    padding: 0;
}

/* Modal flag to the left of the title */
.modal-title::before {
    content: "";
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.5rem;
    vertical-align: middle;
    background-image: url('/img/dha_flag.png');
    background-size: contain;
    background-repeat: no-repeat;
    -webkit-filter: invert(100%);    
    filter: invert(100%);

}
/* Swap to dark flag when the title sits on a dark background */
.modal-title.bg-black.text-white::before,
.bg-black .modal-title::before {
    background-image: url('/img/dha_flag_black.png');
}

/* Modal footer layout */
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Scroll-to-top button */
.btn-scroll-top {
    display: none;
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 1050;
    background-color: maroon !important;
    color: #fff;
    border: none;
    border-radius: .75rem;
    padding: .5rem 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    transition: color .2s ease;
}

    .btn-scroll-top:hover {
        color: #000;
        background-color: maroon !important;
    }

/* Loading text sweep */
.pageLoader {
    width: fit-content;
    font-weight: bold;
    font-family: Verdana, sans-serif;
    font-size: 26px;
}

    .pageLoader::before {
        content: "Page Loading, Please wait...";
        color: #0000;
        -webkit-background-clip: text;
        background-clip: text;
        display: inline-block;
        background-size: calc(200% + 1ch) 100%;
        background-repeat: no-repeat;
        animation: sweep 4s steps(22, end) alternate-reverse infinite;
    }

@keyframes sweep {
    0% {
        background-position: left;
        background-image: linear-gradient(90deg, #582831 calc(50% + 0.5ch), #092068 0);
    }

    49.999% {
        background-position: right;
        background-image: linear-gradient(90deg, #582831 calc(50% + 0.5ch), #092068 0);
    }

    50% {
        background-position: left;
        background-image: linear-gradient(90deg, #092068 calc(50% + 0.5ch), #582831 0);
    }

    100% {
        background-position: right;
        background-image: linear-gradient(90deg, #092068 calc(50% + 0.5ch), #582831 0);
    }
}

/* ==================================================================
   Nested dropdown helper (multi-level)
   ================================================================== */

/*.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -1px;
    }*/
