﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

        .main .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.jumbotron {
    min-height: 100vh;
}

.sidebar {
      background-color: rgba(0,0,102,1);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: #d7d7d7;
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .sidebar .nav-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

.content {
    padding-top: 4.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.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: 1200;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        min-height: 100vh;
        height: auto;
        min-height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 20rem !important;
        padding-right: 1.5rem !important;
        padding-top: 1.1rem;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}
/* Default behavior: take up 80% of the viewport height and enable scrolling */
.custom-scroll {
    height: 80vh;
    overflow: auto;
}

/* For smaller browser heights, take up 70% of the viewport height */
@media (max-height: 722px) {
    .custom-scroll {
        height: 70vh;
    }
}

/* For smaller browser heights, take up 70% of the viewport height */
@media (max-height: 483px) {
    .custom-scroll {
        height: 80vh;
    }
}

input[type="text"] {
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: rgb(28, 111, 248, 0.08);
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

    input[type="text"]:focus {
        background-color: #fff; /* editable background color */
        border-color: #80bdff; /* border color when field is in focus */
        border-width: 2px; /* thicker border when field is in focus */
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* box shadow when field is in focus */
        outline: none; /* remove the default outline */
    }

    input[type="text"]:enabled {
        background-color: #fff; /* editable background color */
        border-color: #ced4da; /* border color when field is enabled */
    }
/*BEGIN: Needed for tree styling*/
.tree-node-items {
    font-size: 16px;
    font-weight: 400;
    line-height: 34px;
    color: rgb(118,118,118);
    font-family: Roboto, Arial, Helvetica, sans-serif
}

.treeview-tooltip {
    margin-right: 5px;
}

.tree-icon-root {
    width: 1em;
    height: 1em;
    display: inline-block;
    transition: fill 200ms cubic-bezier(.4,0,.2,1) 0ms;
    flex-shrink: 0;
    user-select: none;
}

    .tree-icon-root.tree-svg-icon {
        fill: currentColor;
    }

.tree-icon-size-medium {
    font-size: 1.5rem;
}

.tree-info-text {
    color: rgb(33, 150, 243) !important;
}

.tree-treeview-item-arrow-load {
    animation: rotation 1s infinite linear;
}
.custom-node {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Space between icon, text, and other elements */
}
.tree-button-root {
    color: inherit;
    border: 0;
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    outline: 0;
    padding: 0;
    position: relative;
    align-items: center;
    user-select: none;
    border-radius: 0;
    vertical-align: middle;
    -moz-appearance: none;
    justify-content: center;
    text-decoration: none;
    background-color: transparent;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
/*END: Needed for tree styling*/

/* BEGIN: Needed for list box with check boxes */
.list-container {    
    padding-top: 10px;
    padding-left: 10px;
}

.scrollable-list {
    height: 70vh; /* Adjust as needed */
    overflow-y: auto;
    padding-right: 20px; /* Optional padding */
}

.list-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

    .list-item label {
        margin-left: 10px; /* Space between checkbox and label, adjust as needed */
    }
/* END: Needed for list box with check boxes */

.updatingStyle {
    color: forestgreen;
    font-weight: bolder;
}

#updatemessage {
    opacity: 0;
    color: forestgreen;
    font-weight: bolder;
    transition: opacity 2s, visibility 0s linear 2s;
}

    #updatemessage.show {
        opacity: 1;
        color: forestgreen;
        font-weight: bolder;
        visibility: visible;
        transition: opacity 2s, visibility 0s linear 2s;
    }
.form-field {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 4px; /* Adjust space between rows as needed */
}

/* Custom CSS for fixed-width table cells */
.fixed-width-label {
    width: 150px; /* Adjust this width as needed */
}

.fixed-width-input {
    width: 100%; /* Ensure the input fills its container */
}

.form-field {
    width: 100%; /* Make sure the input field fills its <div> container */
}

/* Add animation for the indeterminate progress indicator */
@keyframes dot-flash {
    0% {
        font-weight: normal;
    }
    33% {
        font-weight: bold;
    }
    66% {
        font-weight: normal;
    }
    100% {
        font-weight: normal;
    }
}

.indeterminate-dots {
    display: inline-block;
    font-size: 1rem;
    letter-spacing: 0.2rem;
}

.indeterminate-dots span {
    animation: dot-flash 1.5s infinite;
}

.indeterminate-dots span:nth-child(1) {
    animation-delay: 0s;
}

.indeterminate-dots span:nth-child(2) {
    animation-delay: 0.5s;
}

.indeterminate-dots span:nth-child(3) {
    animation-delay: 1s;
}

/* These can be re-used anywhere. The initial place they are used are on the case
   reports table display.

  Custom CSS for blue zebra-striped table 
  Apply blue background only to odd rows selected by Bootstrap’s table-striped */
.table-blue-zebra > tbody > tr:nth-of-type(odd) > * {
    background-color: #5daeff5f;
}

/* Apply a hover blue and make text white. */
.table-blue-zebra.table-hover > tbody > tr:hover > * {
    background-color: #5daeff;
    color:white;
}

