/* site-overrides.css — global overrides on top of site.css.
   Loaded after site.css so rules here win. Originally ported from
   the legacy .NET 4.7 Content/Site.css. */

/* Bootstrap 5 base */
html {
    font-size: 14px;
}
html { position: relative; min-height: 100%; }
body {
    margin-bottom: 60px; 
    padding-top: 0;
    padding-bottom: 0;
}

.body-content {
    padding-left: 5px;
    padding-right: 5px;
}
@media (min-width: 768px) {
    html { font-size: 14    px; }
}

/*make the staus bar smaller than the bootstrap default */
.fixed-bottom {
    height: 22px !important; /* default: 28px */
}

.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn, .alert {
    line-height: 1 !important; /* default is 1.5, which makes buttons taller */
    padding-top: 0.20rem;
    padding-bottom: 0.25rem;
}
.alert {
    margin-bottom: 1rem;
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
/*make .btn shorter in height */
.btn {
    line-height: 1 !important; /* default is 1.5, which makes buttons taller */
}

    /* override dl-horizontal to allow labels and textbixes on the same line */
    .dl-horizontal dt {
        float: left;
        width: 200px;
        clear: left;
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dl-horizontal dd {
        margin-left: 210px;
    }

    .container-fluidhorizontal {
        display: flex; /* Aligns children horizontally */
        flex-direction: row; /* Default value, can be omitted */
        --gap: 10px; /* Optional: adds space between elements */
    }


/* ===== App-specific styles (ported from Site.css) ===== */

/* Avoid printing href url of links */
@media print {
    a[href]:after { content: none !important; }
}

input, select, textarea {
    font-size: 13px;
    line-height: 1;
    border-radius: 6px;
}
input[type="text"], input[type="password"], input[type="email"], input[type="select"],
input[type="datetime-local"], input[type="date"], input[type="time"],
select, textarea {
    max-width: 280px;
    padding: 0px 4px;
}
input[type="number"],
select, textarea {
    padding: 0px 4px;
}

/* Navbar gradient (Bootstrap 5 uses bg-dark; override here for brand gradient) */
.navbar.bg-dark {
    background-image: linear-gradient(90deg, #ffffff 0%, #71c6ff 100%) !important;
    background-color: #71c6ff !important;
}
/* Nav items stretch to full navbar height so black open-bg fills the bar */
.navbar .navbar-nav {
    align-self: stretch;
    align-items: stretch;
}
.navbar .nav-item {
    display: flex;
    align-items: center;
}
.navbar .nav-link {
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 100%;
    line-height: normal;
}
.navbar.bg-dark .nav-link { color: black; }
.navbar.bg-dark .nav-link:hover { color: orangered; }

/* Hide dropdown caret on user menu toggle */
.user-nav-toggle::after { display: none; }

/* Open dropdown — black bg / white text, full navbar height */
.navbar .nav-item.dropdown.show > .nav-link,
.navbar .nav-item.dropdown.show > .nav-link:hover {
    background-color: #111 !important;
    background-image: none !important;
    color: #fff !important;
}

/* Fixed bottom bar */
/* .fixed-bottom > .container-fluid > span > a,
.fixed-bottom > .container-fluid > a {
    padding-left: 0.3em;
    padding-right: 0.3em;
} */
.fixed-bottom > .container-fluid > span > a:hover,
.fixed-bottom > .container-fluid > a:hover {
    color: orangered;
    background-color: khaki;
}

/* ── All navbar dropdowns: light bg overrides Bootstrap dark theme ───────── */
.navbar .dropdown-menu {
    background-color: #e8e8e8 !important;
    border: 1px solid #bbb;
    --bs-dropdown-bg: #e8e8e8;
}
.navbar .dropdown-menu .dropdown-item {
    color: #111 !important;
    white-space: nowrap;
}
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    background-color: #f5f0c8 !important;
    color: #111 !important;
    outline: 1px solid #c8b850;
    text-decoration: none;
}

/* ── Level-2 submenu: darker gray, positioned below+overlapping parent ───── */
.navbar .dropdown-submenu {
    position: relative;
}
.navbar .dropdown-submenu > .dropdown-menu {
    background-color: #a8a8a8 !important;
    border: 1px solid #888;
    --bs-dropdown-bg: #a8a8a8;
    /* opens below the parent item, 14px from left */
    top: 100% !important;
    left: 14px !important;
    margin-top: 0;
    right: auto;
}
.navbar .dropdown-submenu > .dropdown-menu .dropdown-item {
    color: #111 !important;
}
.navbar .dropdown-submenu > .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-submenu > .dropdown-menu .dropdown-item:focus {
    background-color: #f5f0c8 !important;
    outline: none;
}

/* ── Submenu expand arrow: flex so long item names never push arrow down ─── */
.dropdown-item.submenu-parent {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.submenu-arrow {
    flex-shrink: 0;
    font-size: 1.05em;
    font-weight: bold;
    color: #444;
}
.dropdown-item:hover .submenu-arrow,
.dropdown-item:focus .submenu-arrow {
    color: #111;
}

/* Generic dropdown defaults (non-navbar usage) */
.dropdown-menu {
    background-color: #ccc;
}
.dropdown-menu-dark {
    background-color: #555 !important;
}
.dropdown-menuitem {
    background-color: #ccc;
    color: #080808;
}
.dropdown-item {
    color: #080808;
    white-space: nowrap;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: lightyellow;
    text-decoration: none;
}

/* Forms menu items */
.menu-itemForm {
    padding-left: 20px;
}
.menu-itemForm, .menu-itemForm > a {
    color: #080808;
    white-space: nowrap;
    text-decoration: none;
}
.menu-itemForm > a:nth-child(2) {
    font-size: smaller;
    margin-right: 2em;
}
.menu-itemForm > a:nth-child(2):hover {
    font-style: italic;
    color: red;
}

.menu-itemFolder {
    font-weight: bolder;
    margin-left: 5px;
}
.menu-itemReport {
    margin-left: 20px;
}

/* Dropdown submenu */
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
    right: auto;
}

/* Compact table */
.table {
    margin-top: 8px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td,
.table th, .table td {
    padding: 1px;
    font-size: 13px;
    border: 1px dashed #FFe7f1;
}
.table > tbody > tr > th {
    background-color: aliceblue;
    vertical-align: middle;
}
.table > tbody > tr > td, .table td {
    vertical-align: middle;
}
.odd-row {
    background-color: whitesmoke;
}

/* Upload files table */
.tbl-files {
    border-collapse: collapse;
    font-size: 13px;
    width: auto;
}
.tbl-files th, .tbl-files td {
    padding: 2px 8px;
    border: 1px solid #ddd;
}
.tbl-files th {
    background-color: aliceblue;
    font-weight: bold;
}

/* Glyphicons (Bootstrap 3 compat) */
.glyphicon {
    position: relative;
    top: 1px;
    display: inline-block;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    min-width: 1em;
    text-align: center;
}

.glyphicon::before {
    display: inline-block;
    color: inherit;
}

.glyphicon-sort::before {
    content: "⇅";
}

.glyphicon-sort-by-alphabet::before {
    content: "↓";
}

.glyphicon-sort-by-alphabet-alt::before {
    content: "↑";
}

.glyphicon-sort-by-order::before {
    content: "⇣";
}

.glyphicon-sort-by-order-alt::before {
    content: "⇡";
}
.glyphicon-disabled { color:    gray; }
.glyphicon-small { font-size: 50%; }

/* Provider details panel */
.container-providerdetails {
    position: relative;
    display: inline-block;
    padding: 10px 10px 0 10px;
    border: 1px solid silver;
    background-color: #eeeeee;
}
.container-providerdetails-label {
    position: absolute;
    display: inline-block;
    top: -10px;
    left: 20px;
    font-style: italic;
    font-weight: bold;
    padding-left: 15px;
    padding-right: 15px;
    border: 1px solid silver;
    color: white;
    background-color: silver;
}

/* Form input placeholders */
::placeholder { color: grey; opacity: .5; }
:-ms-input-placeholder { color: grey; }
::-ms-input-placeholder { color: grey; }

/* Responsive container widths */
@media (min-width:  992px) { .container { width: 988px; } }
@media (min-width: 1000px) { .container { width: 996px; } }
@media (min-width: 1025px) { .container { width: 1021px; } }
@media (min-width: 1050px) { .container { width: 1046px; } }
@media (min-width: 1075px) { .container { width: 1071px; } }
@media (min-width: 1100px) { .container { width: 1096px; } }
@media (min-width: 1125px) { .container { width: 1021px; } }
@media (min-width: 1150px) { .container { width: 1146px; } }
@media (min-width: 1175px) { .container { width: 1171px; } }
@media (min-width: 1200px) { .container { width: 1196px; } }


/* The sign-in flow's dialog (wwwroot/js/auth-modal.js). Header and body use Bootstrap's
   .modal-header/.modal-body; only the native dialog element itself needs styling. */
.auth-modal {
    width: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 1px solid var(--ecr-border-menu);
    border-radius: 6px;
    overflow-y: auto;
}
/* Sized by the fields: the site-wide 280px input cap plus .modal-body's padding. */
.auth-step { width: calc(280px + 2rem); max-width: 100%; }
.auth-step-wide { width: 480px; }
.auth-btn { min-width: 68px; }
/* The eye inside the password box. */
.auth-password { position: relative; }
.auth-password .form-control { padding-right: 2.25rem; }
.auth-show-password {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ecr-ink);
    opacity: 0.65;
    line-height: 0;
}
.auth-show-password:hover:not(:disabled) { opacity: 1; }
/* Locked for a password the browser filled in: see auth-modal.js. */
.auth-show-password:disabled { opacity: 0.2; cursor: not-allowed; }
.auth-show-password[aria-pressed="false"] .auth-eye-slash { display: none; }
/* Edge draws its own password reveal icon, next to our eye. */
.auth-modal input::-ms-reveal { display: none; }
/* Only here to tell auth-modal.js that the browser filled a field: it has no event for that. */
@keyframes auth-autofill { from { outline-color: transparent; } to { outline-color: transparent; } }
.auth-modal input:autofill { animation: auth-autofill 0.01s; }
/* Pinned because Home.html, behind the dialog on a full-page visit, has global body/p/h2 rules. */
.auth-modal { font-size: 1rem; }
.auth-modal p { font-size: inherit; }
.auth-modal .modal-title { font-size: 1.25rem; margin: 0; }
/* The caption bar's height: Bootstrap's default is 1rem all round. */
.auth-modal .modal-header { padding: 0.2rem 1rem; background-color: var(--ecr-modal-header-bg); color: white; }
/* Blurred so nothing behind the dialog can be read. Adjust the values in theme.css. */
.auth-modal::backdrop { background: var(--ecr-modal-backdrop); backdrop-filter: blur(var(--ecr-modal-backdrop-blur)); }
/* No JS: shown in place by the open attribute, not in the top layer. */
.auth-modal:not(:modal) { top: 60px; z-index: 1040; box-shadow: 0 0 0 100vmax var(--ecr-modal-backdrop); }
/* D-LAY-01: the page behind must not scroll alongside the dialog. */
body:has(dialog.auth-modal[open]) { overflow: hidden; }
