@import url("../lib/bootstrap/css/bootstrap.min.css");
@import url("../lib/bootstrap/css/bootstrap-grid.min.css");
@import url("../lib/bootstrap/css/bootstrap-reboot.min.css");
@import url("../lib/bootstrap/css/bootstrap-utilities.min.css");
@import url("../lib/bootstrap/css/font/bootstrap-icons.css");

/***********  Custom variables  ***********/
:root {
    --sh-page-padding: 1rem;
    --sh-left-drawer-width: 0;
    --sh-right-drawer-width: 0;
    --bs-light-bg-subtle: #f5f5f5;
    --bs-body-bg-subtle: var(--bs-light-bg-subtle);
    --bs-border-color-translucent: rgba(0, 0, 0, 0.08);
    --splash-height: 12rem;
    --splash-width: 12rem;
}

    :root[data-bs-theme=dark] {
        --bs-body-bg-subtle: var(--bs-dark-bg-subtle);
        --bs-border-color-translucent: rgba(255, 255, 255, 0.15);
    }

    :root[data-bs-theme=dark] .text-bg-light {
        --bs-light: #2b3035;
        --bs-light-rgb: 43, 48, 53;
        color: var(--bs-body-color) !important;
    }


.code {
    background: var(--bs-body-bg-subtle);
    padding: 0.5rem;
    border-radius: 0.25rem;
    line-height: 3;
    border: 1px solid var(--bs-border-color-translucent);
}

/*********** Buttons ***********/
.btn-text-primary, .btn-text-secondary, .btn-text-info, .btn-text-success,
.btn-text-warning, .btn-text-danger, .btn-text-light, .btn-text-dark {
    padding: 0 0.25rem;
}

    .btn-text-primary.btn:disabled, .btn-text-secondary.btn:disabled,
    .btn-text-info.btn:disabled, .btn-text-success.btn:disabled,
    .btn-text-warning.btn:disabled, .btn-text-danger.btn:disabled,
    .btn-text-light.btn:disabled, .btn-text-dark.btn:disabled {
        border: none;
    }

.btn-text-primary {
    color: var(--bs-primary);
}

.btn-text-secondary {
    color: var(--bs-secondary);
}

.btn-text-info {
    color: var(--bs-info);
}

.btn-text-success {
    color: var(--bs-success);
}

.btn-text-warning {
    color: var(--bs-warning);
}

.btn-text-danger {
    color: var(--bs-danger);
}

.btn-text-light {
    color: var(--bs-light);
}

.btn-text-dark {
    color: var(--bs-dark);
}

.btn-text-primary:hover {
    background: var(--bs-primary-bg-subtle)
}

.btn-text-secondary:hover {
    background: var(--bs-secondary-bg-subtle)
}

.btn-text-info:hover {
    background: var(--bs-info-bg-subtle)
}

.btn-text-success:hover {
    background: var(--bs-success-bg-subtle)
}

.btn-text-warning:hover {
    background: var(--bs-warning-bg-subtle)
}

.btn-text-danger:hover {
    background: var(--bs-danger-bg-subtle)
}

.btn-text-light:hover {
    color: var(--bs-dark);
    background: var(--bs-light-bg-subtle);
}

.btn-text-dark:hover {
    background: var(--bs-dark-bg-subtle)
}

/*********** Card ***********/
.card {
    margin-bottom: 0.5rem;
}

/*********** Drawer ***********/
.drawer {
    padding: 1rem;
    display: inline-flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
    transition: width 0.25s ease-in;
}

    .drawer .drawer-trigger {
        display: flex;
    }

    .drawer.right .drawer-trigger {
        flex-direction: row-reverse;
    }

    .drawer .drawer-content, .drawer .drawer-collapsed-content {
        flex: 1 1 auto;
        overflow: auto;
    }
    
    .drawer .drawer-content {
        display: block;
        transition: display 0.5s ease-in;
    }

    .drawer .drawer-collapsed-content {
        display: none;
    }

    .drawer.drawer-collapse .drawer-content {
        display: none;
        transition: display 0.5s ease-in;
    }

        .drawer.drawer-collapse .drawer-collapsed-content {
            display: block;
        }


/*********** Drawer Container ***********/
.drawer-container {
    display: block;
    overflow: hidden;
    position: relative;
}
    .drawer-container .drawer {
        position: absolute;
        top: 0;
    }

    .drawer-container .drawer.left {
        left: 0;
    }

    .drawer-container .drawer.right {
        right: 0;
    }

    .drawer-container .drawer-container-content {
        margin-left: var(--sh-left-drawer-width);
        margin-right: var(--sh-rightt-drawer-width);
        width: calc(100% - var(--sh-left-drawer-width) - var(--sh-right-drawer-width));
        transition: margin 0.25s ease-in;
    }

/*********** Drop Down ***********/
.dropdown-toggle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 10rem;
}

/*********** Floating Labels ***********/

.form-floating, .form-outlined {
    position: relative;
}

.form-floating > label,
.form-outlined > label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    height: 100%;
    padding: 1rem .75rem;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: var(--bs-border-width) solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
}

.form-floating > .form-control-plaintext ~ label,
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label{
    color: rgba(var(--bs-body-color-rgb), .65);
    transform: scale(.85) translateY(-.5rem) translateX(.15rem);
}

.form-outlined > .form-control-plaintext ~ label,
.form-outlined > .form-control:focus ~ label,
.form-outlined > .form-control:not(:placeholder-shown) ~ label,
.form-outlined > .form-select ~ label {
    color: rgba(var(--bs-body-color-rgb), .65);
    transform: scale(.85) translateY(-1.8rem) translateX(.15rem);
}

    .form-floating > .form-control-plaintext ~ label::after,
    .form-floating > .form-control:focus ~ label::after,
    .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
    .form-floating > .form-select ~ label::after,
    .form-outlined > .form-control-plaintext ~ label::after,
    .form-outlined > .form-control:focus ~ label::after,
    .form-outlined > .form-control:not(:placeholder-shown) ~ label::after,
    .form-outlined > .form-select ~ label::after {
        position: absolute;
        inset: 1rem 0.375rem;
        z-index: -1;
        height: 1.5em;
        content: "";
        background-color: var(--bs-body-bg);
        border-radius: var(--bs-border-radius);
    }

/*********** Icons ***********/
.bi {
    vertical-align: text-bottom;
}

.icon-sm {
    font-size: 0.75rem;
}

.icon-lg {
    font-size: 1.75rem;
}

.icon-xl {
    font-size: 2.25rem;
}

/*********** List View ***********/
.list-view-default {
    --list-view-item-padding: 0.5rem 1rem;
}

.list-view-sm {
    --list-view-item-padding: 0.25rem 0.5rem;
}

.list-view-lg {
    --list-view-item-padding: 0.75rem 1.5rem;
}

.list-view-xl {
    --list-view-item-padding: 1rem 2rem;
}

.list-view-item {
    display: block;
    text-decoration: none;
    color: var(--bs-list-group-color);
    background: var(--bs-list-group-bg);
    border-bottom: 1px solid var(--bs-list-group-border-color);
}

    .list-view-item:last-child {
        border-bottom: none;
    }

li.list-view-item {
    padding: var(--list-view-item-padding);
}

div.list-view-item > * {
    display: block;
    padding: var(--list-view-item-padding);
    text-decoration: none;
    color: var(--bs-list-group-color);
}

/* List View - Text Variant */
.list-view-text-primary {
    --bs-list-group-color: var(--bs-primary);
}

    .list-view-text-primary .list-view-item:hover {
        --bs-list-group-bg: var(--bs-primary-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

.list-view-text-secondary {
    --bs-list-group-color: var(--bs-secondary);
}

    .list-view-text-secondary .list-view-item:hover {
        --bs-list-group-bg: var(--bs-secondary-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

.list-view-text-info {
    --bs-list-group-color: var(--bs-info);
}

    .list-view-text-info .list-view-item:hover {
        --bs-list-group-bg: var(--bs-info-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

:root[data-bs-theme=light] .list-view-text-info .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-text-success {
    --bs-list-group-color: var(--bs-success);
}

    .list-view-text-success .list-view-item:hover {
        --bs-list-group-bg: var(--bs-success-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

:root[data-bs-theme=light] .list-view-text-success .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-text-danger {
    --bs-list-group-color: var(--bs-danger);
}

    .list-view-text-danger .list-view-item:hover {
        --bs-list-group-bg: var(--bs-danger-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

:root[data-bs-theme=light] .list-view-text-danger .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-text-warning {
    --bs-list-group-color: var(--bs-warning);
}

    .list-view-text-warning .list-view-item:hover {
        --bs-list-group-bg: var(--bs-warning-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

:root[data-bs-theme=light] .list-view-text-warning .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-text-light {
    --bs-list-group-color: var(--bs-dark);
}

    .list-view-text-light .list-view-item:hover {
        --bs-list-group-bg: var(--bs-light-bg-subtle);
        --bs-list-group-color: var(--bs-dark);
    }

.list-view-text-dark {
    --bs-list-group-color: var(--bs-dark);
}

    .list-view-text-dark .list-view-item:hover {
        --bs-list-group-bg: var(--bs-dark-bg-subtle);
        --bs-list-group-color: var(--bs-light);
    }

:root[data-bs-theme=light] .list-view-text-dark .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-text-body .list-view-item:hover {
    --bs-list-group-bg: var(--bs-body-bg-subtle);
}

/* List View - Filled Variant */

.list-view-primary {
    --bs-list-group-bg: var(--bs-primary);
    --bs-list-group-color: var(--bs-white);
    --bs-list-group-border-color: var(--bs-primary-border-subtle);
}

    .list-view-primary .list-view-item:hover {
        --bs-list-group-bg: var(--bs-primary-bg-subtle);
    }

.list-view-secondary {
    --bs-list-group-bg: var(--bs-secondary);
    --bs-list-group-color: var(--bs-white);
    --bs-list-group-border-color: var(--bs-secondary-border-subtle);
}

    .list-view-secondary .list-view-item:hover {
        --bs-list-group-bg: var(--bs-secondary-bg-subtle);
    }

:root[data-bs-theme=light] .list-view-secondary .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-info {
    --bs-list-group-bg: var(--bs-info);
    --bs-list-group-color: var(--bs-white);
    --bs-list-group-border-color: var(--bs-info-border-subtle);
}

    .list-view-info .list-view-item:hover {
        --bs-list-group-bg: var(--bs-info-bg-subtle);
    }

:root[data-bs-theme=light] .list-view-info .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-success {
    --bs-list-group-bg: var(--bs-success);
    --bs-list-group-color: var(--bs-white);
    --bs-list-group-border-color: var(--bs-success-border-subtle);
}

    .list-view-success .list-view-item:hover {
        --bs-list-group-bg: var(--bs-success-bg-subtle);
    }

:root[data-bs-theme=light] .list-view-success .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-danger {
    --bs-list-group-bg: var(--bs-danger);
    --bs-list-group-color: var(--bs-white);
    --bs-list-group-border-color: var(--bs-danger-border-subtle);
}

    .list-view-danger .list-view-item:hover {
        --bs-list-group-bg: var(--bs-danger-bg-subtle);
    }

:root[data-bs-theme=light] .list-view-danger .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-warning {
    --bs-list-group-bg: var(--bs-warning);
    --bs-list-group-color: var(--bs-white);
    --bs-list-group-border-color: var(--bs-warning-border-subtle);
}

    .list-view-warning .list-view-item:hover {
        --bs-list-group-bg: var(--bs-warning-bg-subtle);
    }

:root[data-bs-theme=light] .list-view-warning .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

.list-view-light {
    --bs-list-group-bg: var(--bs-white);
    --bs-list-group-color: var(--bs-dark);
    --bs-list-group-border-color: var(--bs-light-border-subtle);
}

    .list-view-light .list-view-item:hover {
        --bs-list-group-bg: var(--bs-light-bg-subtle);
        --bs-list-group-color: var(--bs-dark);
    }

.list-view-dark {
    --bs-list-group-bg: var(--bs-dark);
    --bs-list-group-color: var(--bs-light);
    --bs-list-group-border-color: var(--bs-dark-border-subtle);
}

    .list-view-dark .list-view-item:hover {
        --bs-list-group-bg: var(--bs-dark-bg-subtle);
    }

:root[data-bs-theme=light] .list-view-primary .list-view-item:hover {
    --bs-list-group-color: var(--bs-dark);
}

/*********** Modal ***********/

.splash-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.splash {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

    .splash .logo {
        max-height: var(--splash-height);
        max-width: var(--splash-width);
    }

    .splash .progress {
        min-width: var(--splash-width);
        height: 0.25rem;
    }

    .splash .progress-bar {
        width: var(--blazor-load-percentage, 0%);
    }

    .splash .progress-text{
        position: relative;
    }

    .splash .progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
        position: absolute;
        top: -1rem;
        left: -1rem;
    }


/*********** Modal ***********/
.modal.show {
    display: block;
}

/*********** Modal ***********/
.navbar-brand {
    display: flex;
    font-weight: bold;
}

    .navbar-brand img {
        height: 1.75rem;
        margin: 0 0.25rem;
    }

/*********** Overlay ***********/
.sh-overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
}

    .sh-overlay.dark {
        background-color: rgba(0,0,0,0.5);
    }

/***********  Page  ***********/
.page-container {
    padding: var(--sh-page-padding);
    overflow: auto;
    height: 100%;
}

/*********** Scrollbar ***********/
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bs-gray-500) var(--bs-light);
}

/*********** Utilities ***********/
.cursor-pointer { cursor: pointer; }
.text-bold { font-weight:bold; }


/*********** Animations ***********/
.flash-background {
    --flash-color: var(--bs-primary-border-subtle);
    --flash-interval: 1s;
    animation: flash-bg-color var(--flash-interval) linear infinite;
}

@keyframes flash-bg-color {
    0%,100% {
        background-color: var(--flash-color);
        color: white;
    }

    50% {
        background-color: transparent;
        color: var(--flash-color);
    }
}

.flash-opacity {
    --flash-interval: 1s;
    animation: flash-visibility var(--flash-interval) linear infinite;
}

@keyframes flash-visibility {
    0%,100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.flash-shadow {
    --flash-color: var(--bs-primary-border-subtle);
    --flash-interval: 1s;
    border: 1px solid var(--flash-color);
    animation: flash-shadow var(--flash-interval) ease infinite;
}

@keyframes flash-shadow {
    0%,100% {
        box-shadow: 0 0 0 var(--flash-color);
    }

    50% {
        box-shadow: 0 0 10px var(--flash-color);
    }
}