@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    margin: 0px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 400;
    font-size: 18px;
    font-style: normal;
    color: #555759;
    background-color: #ffffff;
}

.login-card-fixed-lg-height {
    min-height: 98vh;
}
@media (min-height: 700px) { /* lg and above */
    .login-card-fixed-lg-height {
        height: 600px;
    }
}

.badge {
    font-weight: 500;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]):not([type=radio]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: red;
    color: white;
    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: 9999;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


/*
    Needed to avoid collisions with BSModals and navbar zindex. Can be removed later
    NOTE: DevExpress popups for report viewer are hard coded to 1050. Blazored Modals need to be less 
    to allow for popups
*/
.blazored-modal-container {
    /* z-index: 100; */
    z-index: 1010;
}

.blazored-modal-overlay {
    /* z-index: 101; */
    z-index: 1011;
}

.blazored-modal {
    /* z-index: 102; */
    z-index: 1012;
}

/* blazored modals */
/* General styles, not specific to screen size */
.custom-blazored-modal,
.custom-blazored-modal-narrower,
.custom-blazored-modal-small {
    display: flex;
    max-height: 95vh;
    height: 95%;
    flex-direction: column;
    z-index: 9000;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #fff;
    padding: 1.5rem;
    box-shadow: 0 2px 2px rgba(0,0,0,.25);
}

.custom-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: solid;
    border-bottom-color: lightgray;
    padding: 0 0 0.75rem 0;
}

/* Ultrawide screens */
@media (min-width: 1900px) {
    .custom-blazored-modal {
        height: 95%;
        width: 65%;
    }

    .custom-blazored-modal-small {
        min-height: 100px;
        max-width: 55%;
        width: -moz-fit-content;
        width: fit-content;
        min-width: 390px;
    }

    .custom-blazored-modal-narrower {
        height: 94%;
        max-width: 900px;
        width: 75%;
        width: 55%;
        min-width: 390px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .custom-blazored-modal {
        height: 95%;
        width: 80%;
    }

    .custom-blazored-modal-small {
        min-height: 100px;
        max-width: 75%;
        width: -moz-fit-content;
        width: fit-content;
        min-width: 390px;
    }

    .custom-blazored-modal-narrower {
        height: 94%;
        max-width: 900px;
        width: 75%;
        min-width: 390px;
    }
}

/* Medium screens */
@media (max-width: 1199px) {
    .custom-blazored-modal {
        height: 90%;
        width: 90%;
        min-width: 320px;
    }

    .custom-blazored-modal-small {
        height: 87%;
        max-width: 85%;
        min-width: 320px;
    }

    .custom-blazored-modal-narrower {
        height: 85%;
        max-width: 80%;
        min-width: 320px;
    }
}

/* Small screens */
@media (max-width: 768px) {
    .custom-blazored-modal,
    .custom-blazored-modal-narrower,
    .custom-blazored-modal-small {
        padding: 0.5rem;
    }

    .custom-blazored-modal {
        height: 99%;
        width: 99%;
        min-width: 200px;
    }

    .custom-blazored-modal-small {
        height: 98%;
        max-width: 97%;
        min-width: 200px; /* Adapt to your needs */
    }

    .custom-blazored-modal-narrower {
        max-height: 95%;
        height: 95%;
        max-width: 95%;
        min-width: 200px; /* Adapt to your needs */
    }
}


/*This is for the inner modal div. The custom class fed to the modal wraps this.
    Setting this to 100% just makes it fill whatever Class is sent to the modal
    then you stylize within the component
*/
.blazored-modal-content {
    height: 100%;
    width: 100%;
}

.main-text-color {
    color: #495057;
    font-weight: bold;
}

.lead {
    font-size: 1rem;
    font-weight: 300
}

/*Stupid bug fix for Adaptive UI Vertical Aggregate hack */
@media (min-width: 1200px) {
    .e-summaryrow .e-summarycell {
        display: table-cell !important;
    }
}

.checklist .header {
    visibility: hidden;
}

.checklist .item {
    flex-direction: column;
    gap: 1.5rem;
}

.checklist .maintenance-item-button {
    visibility: hidden;
}

.question-actions {
    flex-direction: row;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .checklist .header {
        visibility: visible;
    }

    .checklist .item {
        flex-direction: row;
    }

    .checklist .maintenance-item-button {
        visibility: visible;
    }
}

/* Base and universal styles for the nav-menu accordion */
.nav-menu-accordion.e-accordion,
.nav-menu-accordion.e-accordion * {
    background: transparent !important;
    border: none !important;
    font-size: 1.1rem;
}

    .nav-menu-accordion.e-accordion .e-acrdn-item {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

        .nav-menu-accordion.e-accordion .e-acrdn-item .e-acrdn-header .e-acrdn-header-content {
            padding-right: 3rem;
        }

        .nav-menu-accordion.e-accordion .e-acrdn-item .e-acrdn-header * {
            color: white !important;
        }

        .nav-menu-accordion.e-accordion .e-acrdn-item .e-acrdn-header:focus {
            box-shadow: none;
        }

        .nav-menu-accordion.e-accordion .e-acrdn-item .e-acrdn-content {
            margin-left: 1.5rem;
            margin-right: 1.5rem;
            margin-bottom: 0.5rem;
            padding-top: 0;
            border-bottom: solid !important;
            border-color: white !important;
            border-width: thin !important;
        }

.nav-link,
.nav-text {
    color: white;
}

.app-bar-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-brand {
    font-size: 1.1rem;
}

/*Image Height must match app bar minus padding*/
.navbar-image {
    padding: 0.25rem;
    max-height: 46px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-menu-accordion.e-accordion,
    .nav-menu-accordion.e-accordion * {
        font-size: 1rem;
    }

    .app-bar-text {
        font-size: 1rem;
    }

    .navbar-brand {
        display: none;
    }
}

/*Give SF dropdowns a background and border*/
.e-dropdown-popup {
    background: #e6e6e6;
    color: #212529;
    border: #414141;
    border-style: solid;
    border-width: thin;
}


.line-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    position: relative;
}

    .line-separator::before,
    .line-separator::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #000;
    }

    .line-separator:not(:empty)::before {
        margin-right: 0.5rem;
    }

    .line-separator:not(:empty)::after {
        margin-left: 0.5rem;
    }

/* Default state: button overlays the line */
.line-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bs-body-bg);
    padding-left: 0.5rem;
}

/* Media Query for medium/small screens: button moves below the line */
@media (max-width: 768px) {
    .line-separator {
        flex-wrap: wrap; /* Allow items to wrap onto multiple lines */
    }

    .line-right {
        position: static;
        order: 2;
        transform: none;
        width: 100%;
        margin-top: 0.25rem;
        margin-top: 0.25rem;
        padding-right: 0;
        text-align: right;
    }
}


/* Allow header cells to grow taller than one line */
.e-grid .e-headercontent .e-headercell,
.e-grid .e-detailheadercell {
    height: auto; /* overrides the 34px theme height */
}

/* Show up to 3 lines of header text, then clip */
.e-grid .e-headercell .e-headercelldiv {
    white-space: normal; /* enable wrapping */
    display: -webkit-box; /* line-clamp mechanism */
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* clamp to 3 lines (WebKit) */
    line-clamp: 3; /* modern spec */
    overflow: hidden; /* hide extra lines */
    text-overflow: ellipsis;
}