﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--elog-link);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2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        content: "An error has occurred."
    }


/* the logo file is twice this size so it stays sharp on high-density screens */
.login-logo {
    width: 252px;
    max-width: 100%;
    height: auto;
}

.login-button {
    min-width: 200px;
}

.login-form .input-group-text {
    height: 100%;
}


.card-title 
{
    font-size: 1.25em;
    font-weight: bold;
}

.back-arrow
{
   
    font-size: 1.5rem;
    margin-right: 15px !important;
    margin-left: 10px !important;
}



/* ============ Look and feel: colours, buttons, header ============ */
:root {
    /* THE brand colour: change these four lines to re-colour every button, menu highlight, focus ring and heading */
    --elog-primary: #0868b0;          /* the blue of the Elisian logo mark */
    --elog-primary-dark: #064f86;
    --elog-primary-border: #0868b0;
    --elog-primary-rgb: 8, 104, 176;
    --elog-link: #0868b0;
    /* Bootstrap reads these for text-primary, spinners, focus and so on */
    --bs-primary: var(--elog-primary);
    --bs-primary-rgb: var(--elog-primary-rgb);
    --bs-link-color: var(--elog-link);
    --elog-grey: #6c757d;
    --elog-header-bg: #f8f9fa;
    --elog-touch: 44px;          /* the smallest comfortable target for a finger */
}

/* One button system: primary (gold), secondary (grey), danger (red). A caption, then an icon after it. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: var(--elog-touch);
    padding: .5rem 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.btn-sm {
    min-height: 38px;
    padding: .35rem .75rem;
}

.btn-primary {
    color: #fff;
    background-color: var(--elog-primary);
    border-color: var(--elog-primary-border);
}

    .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
        color: #fff;
        background-color: var(--elog-primary-dark);
        border-color: var(--elog-primary-border);
    }

/* menus and focus follow the brand colour too (Bootstrap's own default is its blue) */
.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--elog-primary);
    --bs-dropdown-link-active-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--elog-primary-border);
    box-shadow: 0 0 0 .25rem rgba(var(--elog-primary-rgb), .25);
}

.btn:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(var(--elog-primary-rgb), .35);
}

.btn:disabled, .btn.disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* a row of buttons that share the width evenly (the toolbars) */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

    .btn-row > .btn {
        flex: 1 1 8rem;
    }

/* ---- Header: logo, module, location, user: one row at every width ---- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: var(--elog-header-bg);
    border-bottom: 1px solid #e3e3e3;
}

.navbar-logo {
    flex: 0 0 auto;
    height: 40px;
    width: auto;
    border-radius: 25%;
}

/* a very narrow screen needs the room more than the logo */
@media (max-width: 480px) {
    .navbar-logo {
        display: none;
    }
}

.app-header-home {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--elog-touch);
    height: var(--elog-touch);
    color: var(--elog-primary);
    font-size: 1.35rem;
    text-decoration: none;
    border-radius: 50%;
}

    .app-header-home:hover, .app-header-home:focus-visible {
        background: rgba(var(--elog-primary-rgb), .1);
    }

.app-header-selects {
    flex: 1 1 auto;
    min-width: 0;                 /* lets the drop-downs shrink instead of pushing the user off the screen */
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.app-header-error {
    flex: 0 0 auto;
    align-self: center;           /* the header's drop-down area stretches its children: do not stretch this one into a tall box */
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 40px;
    padding: 0 .75rem;
    font-size: .85rem;
    white-space: nowrap;
}

/* a drop-down with its label beside it; the labels only appear when there is room (see the media query below) */
.app-header-field {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}

.app-header-label {
    display: none;
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--elog-grey);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .app-header-label {
        display: inline;
    }
}

.app-header-field-module {
    flex: 0 0 auto;                /* keeps its name readable; the location is the one that gives way */
}

    .app-header-field-module .form-select {
        width: auto;
        min-width: 6rem;
        max-width: 9rem;
        text-overflow: ellipsis;
    }

.app-header-field-location {
    flex: 0 1 20rem;
}

    .app-header-field-location .form-select {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        text-overflow: ellipsis;
    }

.app-header .form-select {
    min-height: 40px;
    padding-left: .6rem;
    padding-right: 1.9rem;
    background-position: right .5rem center;
}

/* ---- User icon and its menu (UserMenu component) ---- */
.user-menu {
    position: relative;
    flex: 0 0 auto;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: var(--elog-touch);
    padding: 0 .25rem;
    background: transparent;
    border: 0;
    color: #222;
}

.user-menu-name {
    color: var(--elog-primary-border);
    font-weight: bold;
    font-size: small;
}

.user-menu-icon {
    font-size: 1.75rem;
}

.user-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
}

.user-menu-list {
    position: absolute;
    top: 100%;
    right: 0;                      /* opens straight down from the icon, lined up with its right edge */
    z-index: 1040;
    width: max-content;            /* as wide as its longest item, not squeezed to the width of the icon it hangs from */
    min-width: 12rem;
    max-width: min(20rem, calc(100vw - 1.5rem));
    margin: .25rem 0 0;
    padding: .25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: .5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.user-menu-heading {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    overflow-wrap: anywhere;      /* a long name wraps onto a second line instead of being cut off */
}

    .user-menu-heading i {
        width: 1.25rem;
        padding-top: .15rem;
        text-align: center;
    }

    .user-menu-list button, .user-menu-list a {
        display: flex;
        align-items: center;
        gap: .75rem;
        width: 100%;
        min-height: var(--elog-touch);
        padding: 0 1rem;
        background: transparent;
        border: 0;
        color: #222;
        text-align: left;
        text-decoration: none;
        white-space: nowrap;      /* an item is one line; only the name (below) may wrap */
    }

        .user-menu-list button:hover, .user-menu-list a:hover {
            background: #f1f1f1;
        }

    .user-menu-list i {
        width: 1.25rem;
        text-align: center;
    }

.pm-sub {
    font: 500 14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: #444;
}

    .pm-sub.loading::after {
        content: "";
        animation: dots steps(4, end) 1.2s infinite;
    }

@keyframes dots {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75% {
        content: "...";
    }

    100% {
        content: "";
    }
}


/* ---- Dialogs (DialogHost component) ---- */
.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .4);
    z-index: 10000;
}

.app-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    padding: 24px 28px;
    width: min(92vw, 440px);
    text-align: center;
}

.app-dialog-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 8px;
}

.app-dialog-success { color: #3fc3a0; }
.app-dialog-error { color: #f27474; }
.app-dialog-question { color: #87adbd; }
.app-dialog-info { color: var(--elog-primary); }

.app-dialog-title {
    font-size: 1.5rem;
    margin: 0 0 10px;
}

.app-dialog-message {
    white-space: pre-line;
    word-break: break-word;
    margin-bottom: 20px;
}

.app-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* ---- Download progress (ProgressOverlay component) ---- */
#progressModalOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .5);
    z-index: 9999;
}

.pm-card {
    background: #fff;
    padding: 22px 26px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    text-align: center;
    min-width: 260px;
}

/* Radial progress: --p is 0-100 */
.radial {
    --p: 0;
    --track: #e6e6e6;
    --accent: #1e90ff;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--track) 0);
    display: grid;
    place-items: center;
    margin: 10px auto 8px;
    position: relative;
}

    .radial::after {
        content: attr(data-label);
        position: absolute;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: #333;
        color: #fff;
        display: grid;
        place-items: center;
        font: 600 22px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
    }

/* ---- Select-or-type box (LookupCombo component) ---- */
.lookup-combo {
    position: relative;
}

    .lookup-combo input.form-control {
        padding-right: 34px;
    }

.lookup-combo-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #888;
    padding: 0 4px;
}

.lookup-combo-list {
    position: absolute;
    z-index: 1050;
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .15);
}

.lookup-combo-option {
    padding: 8px 12px;
    cursor: pointer;
}

    .lookup-combo-option:hover {
        background: #eee;
    }


/* ---- SBT form and search page (SbtForm, SuggestInput, the Create/Edit pages) ---- */
.sbt-form .form-group {
    margin-bottom: 15px;
    text-align: left;
}

    .sbt-form .form-group label {
        font-weight: bold;
    }

.sbt-form .form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.sbt-form .suggestions {
    border: solid thin grey;
    border-radius: 5px;
    box-shadow: 5px 5px 2px #efefefef;
}

.sbt-form .suggested-option {
    margin-left: 15px;
    cursor: pointer;
}

    .sbt-form .suggested-option:hover {
        background-color: #eeeeee;
    }

/* ---- OATS activity details (InstructionCard, ThresholdBar) ---- */
.threshold-bar div {
    padding: 2px 4px;
    font-size: 80%;
}

/* OATS schedule: an activity on the dashboard, coloured by state (see OatsSchedule.CssClass) */
.OATSScheduledItem {
    background-color: #fff;
    color: black;
    border: 1px solid gray;
    border-radius: 5px;
    box-shadow: gray 2px 2px;
    height: auto;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 10px;
}
.due { background-color: #90ee90 !important; }
.overdue { background-color: #ff0000 !important; color: white !important; }
.overdue a { color: white !important; }
.future { background-color: #ffffff !important; }
.expired { background-color: #b0b0b0 !important; }
.complete { background-color: #99cffc !important; }

/* ---- The one-off "add to home screen" invitation (InstallBanner component) ---- */
.install-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin: 0 0 1rem;
    padding: .6rem .9rem;
    background: rgba(var(--elog-primary-rgb), .08);
    border: 1px solid rgba(var(--elog-primary-rgb), .35);
    border-radius: .5rem;
}

.install-banner-text {
    flex: 1 1 14rem;
    font-weight: 600;
}

    .install-banner-text i {
        margin-right: .4rem;
        color: var(--elog-primary);
    }

.install-banner-buttons {
    flex: 0 1 auto;
}

    .install-banner-buttons > .btn {
        flex: 1 1 auto;
    }

/* ---- Toolbars (AppToolbar component) ---- */
.app-toolbar {
    margin: .75rem 0 1rem;
}

    .app-toolbar > .form-select {
        flex: 1 1 10rem;
        width: auto;
        min-height: var(--elog-touch);
    }

.toolbar-note {
    flex: 1 1 100%;
    text-align: center;
    font-weight: 600;
    color: var(--elog-grey);
}

/* ---- Activity details: the status buttons stay on screen while you scroll ---- */
.action-bar {
    position: sticky;
    bottom: 0;
    z-index: 1010;
    margin: 1rem -1rem -1rem;
    padding: .75rem 1rem;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, .06);
}

/* ---- SBT drafts ---- */
.draft-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .75rem;
}

.draft-list summary {
    color: var(--elog-link);
    cursor: pointer;
    min-height: var(--elog-touch);
    display: flex;
    align-items: center;
}

/* ---- Form labels and inputs: comfortable for a finger ---- */
.form-control, .form-select {
    min-height: 40px;
}

label {
    margin-bottom: .25rem;
}
