﻿/* ── Sidebar: stop above footer; scroll menu when items exceed height ── */
:root {
    /* Portal brand / sidebar — change this one value to retheme the whole app */
    /*--portal-sidebar-bg: #343a40;*/
    --portal-sidebar-bg: #222831;
    --portal-sidebar-text: #ffffff;
    --portal-sidebar-brand-icon-color: #ffffff;
    --portal-footer-height: 57px;
    --portal-brand-height: 3.5rem;
}

.portal-brand-color { color: var(--portal-sidebar-bg); }
.portal-brand-bg { background-color: var(--portal-sidebar-bg); }
.portal-brand-border { border-color: var(--portal-sidebar-bg); }

/*MODAL*/
body.modal-open {
    overflow: hidden !important;
}

/* Smooth fade animation */
.modal.fade {
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.modal.show {
    opacity: 1;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.modal-backdrop.show {
    opacity: 0.5; /* Adjust backdrop darkness */
}
/*MODAL*/

html, body {
    font-family: Calibri, Arial, Helvetica, sans-serif;
    font-size: 0.9em;
}

@media (max-width: 1023px) {
    html, body {
        font-size: 0.7em;
    }
}

@media (min-width: 1024px) {
    html, body {
        font-size: 0.9em;
    }
}

/* Selects: match Bootstrap .form-control inputs (inherit was smaller than 1rem) */
select.form-control {
    font-size: 1rem !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    line-height: 1.5;
}

    select.form-control.form-control-sm {
        font-size: 0.875rem !important;
    }

    select.form-control option {
        font-size: inherit;
        font-family: inherit;
    }

.cs-toast {
    display: none;
    padding: 1rem;
    color: #fff;
    z-index: 9999;
    position: absolute;
    width: 25rem;
    top: 2rem;
    border-radius: 1rem;
    right: 1rem;
    margin-top: 30px;
    margin-left: -50px;
}

.cs-toast-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 1rem;
    font-size: 2.5rem;
}

.cs-toast-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-left: 1rem;
}

    .cs-toast-body p {
        margin-bottom: 0;
    }

.cs-toast-visible {
    display: flex;
    flex-direction: row;
    animation: fadein 2s;
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/*
a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.btn {
    background-color: var(--portal-sidebar-bg);
}*/

header {
    padding-bottom: 10px;
    font-size: 1em;
}

/* Page header bar — icon, label, and action button on one inline row */
.card-header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

    .card-header > div {
        float: none !important;
        padding: 0 !important;
    }

        .card-header > div:first-child {
            flex: 1 1 auto;
            min-width: 0;
            display: inline-flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: center;
            gap: 8px;
            font-size: 20px;
            line-height: 1;
            text-transform: uppercase;
            font-weight: bold;
        }

        .card-header > div:last-child:not(:only-child) {
            flex: 0 0 auto;
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
        }

    .card-header h1,
    .card-header h2,
    .card-header h3,
    .card-header h4,
    .card-header h5 {
        margin: 0;
        padding: 0;
        font-size: inherit;
        font-weight: inherit;
        line-height: 1;
        display: inline-flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .card-header svg {
        display: inline-block;
        vertical-align: middle;
        flex-shrink: 0;
        width: 27px;
        height: 27px;
        padding: 0 !important;
        margin: 0;
    }

    .card-header b,
    .card-header i,
    .card-header small {
        vertical-align: middle;
    }

.headerButton {
    background-color: #C51B35;
    border-radius: 9px;
    color: white;
    font-size: 12px;
    min-width: 100px;
    padding: 0 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    line-height: 1.2;
    white-space: nowrap;
}

    .headerButton:hover {
        background-color: var(--portal-sidebar-bg);
        color: white;
        transition-duration: 0.8s;
    }

    .headerButton:not(hover) {
        transition-duration: 0.10s;
    }

.myButton {
    background-color: #C51B35;
    border-radius: 9px;
    color: white;
    font-size: 12px;
    min-width: 100px;
    padding: 9px 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    line-height: 1.2;
}

    .myButton:hover {
        background-color: var(--portal-sidebar-bg);
        color: white;
    }

.card-header .headerButton,
.card-header .myButton,
.card-header a.headerButton,
.card-header a.myButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 31px;
    min-height: 31px;
    max-height: 31px;
    padding: 0 14px;
    position: static;
    top: auto;
    box-sizing: border-box;
    line-height: 1;
    vertical-align: middle;
}

    .card-header .headerButton .fa,
    .card-header .myButton .fa {
        font-size: 1em;
        line-height: 1;
        vertical-align: middle;
    }

.isDisabled {
    color: currentColor;
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: none;
}

.Pageloader {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: block;
    margin: 15px auto;
    position: relative;
    background: #FFF;
    box-shadow: -24px 0 #FFF, 24px 0 #FFF;
    box-sizing: border-box;
    animation: shadowPulse 2s linear infinite;
    margin-top: 100px;
}

#grid tr:hover {
    background-color: #f5f5f5;
    color: var(--portal-sidebar-bg);
    cursor: pointer;
    animation: fadein 1s;
}

.mud-nav-link:visited {
    color: red;
}

/* AdminLTE sidebar shell + MudNavMenu (Menu.razor) */
.main-sidebar.sidebar-dark-primary,
.main-sidebar.sidebar-dark-primary .brand-link,
.main-sidebar .sidebar {
    background-color: var(--portal-sidebar-bg) !important;
}

.brand-link .portal-brand-icon {
    height: 27px;
    width: auto;
    vertical-align: middle;
}

.brand-link .portal-brand-icon .portal-brand-icon-accent {
    fill: var(--portal-sidebar-brand-icon-color);
}

.brand-link .brand-text {
    color: var(--portal-sidebar-text);
}

.portal-sidebar-navmenu,
.portal-sidebar-navmenu .mud-nav-link,
.portal-sidebar-navmenu .mud-nav-group {
    background-color: var(--portal-sidebar-bg) !important;
    color: var(--portal-sidebar-text) !important;
}

.main-sidebar,
body.sidebar-mini .main-sidebar,
body.layout-fixed .main-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: var(--portal-footer-height) !important;
    height: calc(100vh - var(--portal-footer-height)) !important;
    max-height: calc(100vh - var(--portal-footer-height)) !important;
}

    .main-sidebar .sidebar {
        overflow-y: auto;
        height: calc(100vh - var(--portal-footer-height) - var(--portal-brand-height));
        max-height: calc(100vh - var(--portal-footer-height) - var(--portal-brand-height));
    }

/* ── Collapsed sidebar: clip MudBlazor text that bleeds past icon-only width ── */
.sidebar-collapse .main-sidebar {
    overflow: hidden;
}

    .sidebar-collapse .main-sidebar .mud-nav-link-text,
    .sidebar-collapse .main-sidebar .mud-nav-group-header-text,
    .sidebar-collapse .main-sidebar .mud-nav-link-icon-wrapper + span {
        display: none !important;
    }

    /* Restore full sidebar on hover (AdminLTE behaviour) */
    .sidebar-collapse .main-sidebar:hover {
        overflow: visible;
    }

        .sidebar-collapse .main-sidebar:hover .mud-nav-link-text,
        .sidebar-collapse .main-sidebar:hover .mud-nav-group-header-text,
        .sidebar-collapse .main-sidebar:hover .mud-nav-link-icon-wrapper + span {
            display: inline !important;
        }

/* ── Layout: keep navbar, sidebar and footer always visible ── */

/* Clip anything that escapes the content area */
.content-wrapper {
    overflow: hidden !important;
}

/* All scroll containers: size relative to viewport minus fixed chrome */
/* navbar(57) + footer(56) + page card-header(57) + padding(35) = 205px  */
.mainContainer {
    height: calc(100vh - 205px) !important;
    max-height: calc(100vh - 205px) !important;
    overflow-y: auto !important;
    overflow-x: hidden;
}

/* Cards that act as the outer frame — let mainContainer drive the height */
.card {
    overflow: hidden;
}