﻿:root {
    --mud-appbar-height: 70px !important;
    --mud-palette-action-default-hover: #46566C !important;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.color-white {
    color: white !important;
}

/* FocusOnNavigate moves focus to the page heading for screen readers; the heading is not a control, so no focus ring. */
h1:focus {
    outline: none;
}

.hide-overflow {
    overflow: hidden;
}

.login-eye {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    height: 12px;
    width: 12px;
    cursor: pointer;
    background: no-repeat;
    background-image: url('images/eye.svg');
    animation-duration: 0.6s;
    animation-name: zoom;
    animation-timing-function: ease-in-out;
}

    .login-eye:hover {
        transform: scale(1.5) translateY(-30%)
    }

.mud-card-actions {
    padding: 18px !important;
}

.mud-card-content {
    padding: 18px !important;
}

.mud-card-header {
    padding: 18px !important;
    border-bottom: 1px solid gray;
}

.mud-toolbar-gutters {
    padding: 0px !important;
}

/* The drawer content scrolls; the nav is a column at least as tall as the drawer so the bottom links sit under the
   expanded search groups instead of over them. */
.authorized-nav {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.authorized-nav-column {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

/* In-place search lists (Classic's menu selects) on the dark drawer: the class name shows as the placeholder.
   MudBlazor's .mud-select grows (flex-grow: 1), which in this flex column shared the spare drawer height out as a blank
   band under each list instead of leaving it above the footer. */
.authorized-nav-column > .mud-select {
    flex-grow: 0;
}

.nav-select .mud-input,
.nav-select .mud-select-input,
.nav-select .mud-input-adornment .mud-icon-root {
    color: #FFFFFF;
}

.nav-select .mud-input input::placeholder {
    color: #FFFFFF;
    opacity: 1;
}

.nav-select .mud-input.mud-input-outlined .mud-input-outlined-border,
.nav-select .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.4);
}

/* The same list on a static page, where MudSelect has no circuit: sized and coloured as the outlined dense MudSelect. */
.nav-select-static {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font: inherit;
    font-size: 0.875rem;
    color: #FFFFFF;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

    .nav-select-static option {
        color: #000000;
        background-color: #FFFFFF;
    }

/* The menu on a static page (MainLayout's static branch). From the sm breakpoint up it is the open drawer; below it
   the drawer would leave a phone almost no room, so it is hidden, the page takes the full width and the same menu
   sits collapsed above the page. */
.static-nav-mobile {
    display: none;
}

@media (max-width: 599.98px) {
    .static-layout .static-nav-drawer {
        display: none;
    }

    .static-layout .mud-main-content {
        margin-left: 0 !important;
    }

    /* The open drawer also insets the top bar by its width; without the drawer the bar spans the screen. */
    .static-layout .mud-appbar {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .static-nav-mobile {
        display: block;
        background-color: var(--mud-palette-drawer-background);
        color: var(--mud-palette-drawer-text);
    }

        .static-nav-mobile > summary {
            padding: 12px 16px;
            font-weight: 600;
            cursor: pointer;
        }
}

.nav-bottom {
    margin-top: auto;
    padding-top: 24px;
}

.p-30px {
    padding: 30px;
}

.px-10px {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.px-10vw {
    padding-left: 10vw !important;
    padding-right: 10vw !important;
}

.py-10px {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.py-7vw {
    padding-top: 7vw !important;
    padding-bottom: 7vw !important;
}

.unauthorized-appbar {
    padding: 0px 10vw 0px 10vw;
}

.unauthorized-backsplash {
    width: 100%;
    background: linear-gradient(90deg, rgba(56, 93, 100, 0.76) 42.68%, rgba(56, 93, 100, 0) 100%), url('images/unauthorized_gl_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.unauthorized-backsplash-login {
    width: 60%;
    margin-left: auto;
}

/* The public layout fills the viewport below the app bar so the footer sits at the bottom on short pages
   and is pushed down by the body on long ones. MudMainContent pads the top by the app bar height. */
.unauthorized-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--mud-appbar-height));
}

.unauthorized-body {
    flex: 1 0 auto;
    align-content: flex-start;
}

.unauthorized-footer {
    flex: 0 0 auto;
    margin-top: auto;
    background-color: #2B394C;
}

/* The Integrity logo is navy on the site; the footer is dark, so it is rendered white. */
.unauthorized-footer-logo {
    height: 36px;
    filter: brightness(0) invert(1);
}

.unauthorized-footer-copyright {
    color: #8c939e;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.unauthorized-nav-link {
    font-weight: 600 !important;
    font-size: 14px !important;
}

.w-50 {
    width: 50%;
}

.w-100 {
    width: 100%;
}

/* LG Mobile CSS */
@media (min-width: 1281px) {
    .hide-lg {
        display: none !important;
    }
}

/* MD Mobile CSS */
@media (min-width: 961px) and (max-width: 1280px) {
    .hide-md {
        display: none !important;
    }

    .unauthorized-backsplash-login {
        width: 80%;
    }
}

/* SM Mobile CSS */
@media (min-width: 601px) and (max-width: 960px) {
    .hide-sm {
        display: none !important;
    }

    .unauthorized-backsplash {
        background: linear-gradient(90deg, rgba(56, 93, 100, 0.76) 100%, rgba(56, 93, 100, 0) 100%), url('images/unauthorized_gl_background.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .unauthorized-backsplash-login {
        width: 100%;
        margin-right: auto;
    }
}

/* XS Mobile CSS */
@media (max-width: 600px) {
    :root {
        --mud-appbar-height: 64px !important;
    }

    .hide-xs {
        display: none !important;
    }

    .mud-toolbar-gutters {
        padding-left: 24px !important;
    }
}

/* Loading overlay (Loading.razor): three MudBlazor-style rings over the content area. Fixed to the viewport beside the
   persistent drawer and under the drawer (z-index 1100) and app bar (1300), so the navigation is not dimmed and the
   rings sit in the middle of what the user is looking at, however far the page is scrolled. */
.loading-background {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.6);
}

/* MudBlazor draws an outlined input's hover border in ActionDefault, which the theme sets to white for the drawer;
   on a white page that made the field disappear under the pointer. */
@media (hover: hover) and (pointer: fine) {
    .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border {
        border-color: var(--mud-palette-text-primary);
    }
}

.mud-drawer-open-persistent-left .loading-background {
    left: var(--mud-drawer-width-left);
}

.mud-loader {
    position: absolute;
    width: 64px;
    height: 64px;
    border: 4px solid transparent;
    border-top-color: #0F8ED6;
    border-radius: 50%;
    animation: gl-spin 1s linear infinite;
}

@keyframes gl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Static-SSR login form (no interactive MudBlazor inputs): Bootstrap-like floating fields without Bootstrap. */
.form-floating {
    position: relative;
}

.form-control {
    display: block;
    width: 100%;
    height: 56px;
    padding: 1.25rem 2.25rem 0.5rem 0.75rem;
    font-size: 16px;
    line-height: 1.25;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}

    .form-control:focus {
        outline: 0;
        border-color: #0F8ED6;
        box-shadow: 0 0 0 0.2rem rgba(15, 142, 214, 0.25);
    }

.form-floating > .form-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1rem 0.75rem;
    pointer-events: none;
    color: #6c757d;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating > .form-control:focus ~ .form-label,
.form-floating > .form-control:not(:placeholder-shown) ~ .form-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-control::placeholder {
    color: transparent;
}

/* Browser autofill paints its own background and does not always update :placeholder-shown, so the label is
   floated and the field colours kept from the autofill pseudo-class. */
.form-floating > .form-control:-webkit-autofill ~ .form-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #212529;
    transition: background-color 9999s ease-in-out 0s;
}

.text-danger {
    color: #b32121;
}

.validation-message {
    font-size: 12px;
    margin-top: 4px;
}

.login-status {
    margin: 0 18px 12px 18px;
}

/* The ported public pages, FAQ and help. Classic drew the FAQ questions and help categories in #FF0000 and the privacy
   headings in navy; the rewrite deliberately draws all three in the theme primary (teal under the Classic look). */
.text-right {
    text-align: right;
}

.faq-question,
.help-category,
.privacy-heading {
    color: var(--mud-palette-primary);
}

.help-text table,
.faq-answer table {
    border-collapse: collapse;
}

.help-text td,
.faq-answer td {
    padding: 2px 6px;
    vertical-align: top;
}

/* Phase 7: the multi-select checkboxes in the admin site list are drawn in ActionDefault, which the theme sets to white
   for the drawer; on the white list they are drawn in the primary blue so the ticked state shows. */
.admin-site-list .mud-icon-root {
    color: var(--mud-palette-primary);
}

/* The code page's "Send a new code": a form button drawn as a link, so the resend is a POST on the static page. */
.verify-resend-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--mud-palette-primary);
    text-decoration: underline;
    cursor: pointer;
}
