@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    /* Result Status colors */
    --result-accept: rgba(40, 167, 69, 0.5); /* #28a745 at 0.5 opacity*/
    --result-reject: rgba(189, 4, 23, 0.5); /* #dc3545 at 0.5 opacity*/
    --result-unknown: rgba(52, 168, 235, 0.5); /* #34a8eb at 0.5 opacity */
    --result-warning: rgba(255, 193, 7, 0.5); /* #f7e483 at 0.5 opacity*/
    --result-error: rgba(255, 193, 7, 0.5); /* #ffc107 at 0.5 opacity*/
    /* Navigation drawer width*/
    --mat-drawer-custom-width: 250px;
    /* Traceability card selection color */
    --selected-outline: rgba(66, 85, 99, 0.5); /* Primary at 1 opacity */
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    padding: 1rem;
    width: calc(100vw - var(--mat-drawer-custom-width));
}

.main .top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
}

.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;
}

.sidebar {
    border-right-style: outset;
    padding: 0px;
    border-right-width: 2px;
}

.sidebar .top-row {
    background-color: rgba(65, 84, 98, 0.8);
    margin: 0;
    padding: 0.5em;
}

.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: #007bff;
    color: white;
}

.sidebar .nav-item a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .mdc-list-item--selected {
    background-color: rgba(65, 84, 98, 0.65);
    color: white;
}

.sidebar .material-icons {
    margin: 0 10px 0 0;
}

.sidebar .top-row .logo {
    max-width: 100%;
}

.content {
    padding: 0;
    margin: 0 0 0 0;
}

.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: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

@media (max-width: 767.98px) {
    .main {
        flex: 1;
        padding: 1rem;
        width: 100vw;
    }

    .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: var(--mat-drawer-custom-width);
        height: 100vh;
        position: sticky;
        top: 0;
        flex-shrink: 0;
        overflow: auto;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}

.quick-add-btn {
    font-size: 36px;
    position: fixed;
    right: 30px;
    bottom: 30px;
}

.entity-edit {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.6);
}


/* Message display */
.m-fadeOut {
    animation: fadeout 5000ms;
    animation-fill-mode: forwards;
    opacity: 0;
}


@keyframes fadeout {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.messagediv {
    height: 60px;
    line-height: 60px;
    justify-content: center;
    width: 100%;
}

    .messagediv > span {
        display: table-cell;
        vertical-align: middle;
        padding: 2px 10px 2px 10px;
    }

/* Hides the text portion of the InputFile component */
input[type=file] {
    color: transparent;
}

.page-title-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin: 0 0 0 0;
    padding: 0;
}

    .page-title-container .page-title {
        display: flex;
        align-items: center;
        font-size: 2.5em;
        margin: 0 0 0 0;
    }

    .page-title-container .mdc-button__icon {
        margin: 0 0 0 0 !important;
        height: 5vh !important;
        width: 5vh !important;
        padding: 0;
        font-size: 3rem !important;
        display: flex !important;
        align-items: center;
    }

    .page-title-container .back-button {
        width: 60px;
        height: 5vh;
        margin: 0 0 0 0 !important;
        color: black !important;
        padding: 0;
    }

.detail {
    justify-content: center !important;
    align-self: center;
    display: inline-block !important;
    margin: 10px 10px 10px 10px;
    padding: 5px;
    min-width: 25vw;
}

.detail-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between
}

    .detail-header .detail-title {
        text-align: center;
        width: 100%;
    }

.detail-row {
    display: flex;
    flex-direction: column;
}

    .detail-row .detail-key {
        font-size: 1.4em;
        font-weight: bold;
        margin: 10px 10px 0px 10px;
        justify-content: center;
        align-content: center;
    }

    .detail-row .detail-value {
        font-style: oblique;
        margin: 0 25px 0 25px;
        max-width: 700px;
    }


.detail-value .detail-text-field {
    min-width: 600px !important;
    background-color: blue;
}


.detail-value .detail-image {
    object-fit: contain;
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    border-style: outset;
}

.detail .help-button {
    float: right;
    margin: 3px 3px 3px 3px;
    width: 25px;
    height: 25px;
    min-width: 0px !important;
}

.detail .detail-button {
    font-size: 24px !important;
    padding: 20px;
    margin: 30px 5px 0 5px !important;
}

.help-button .mdc-button__icon {
    margin: 0 0 0 0 !important;
    height: 25px !important;
    width: 25px !important;
    padding: 0;
    font-size: 1.5rem !important;
    display: flex !important;
    align-items: center;
}

.detail .detail-button .mdc-button__icon {
    font-size: 1em !important;
    height: 1em;
    vertical-align: central;
}

.alert-button {
    color: #FF5C4F !important;
}

.detail-table {
    margin: 10px 10px 10px 10px !important;
    width: min-content !important;
}

    .detail-table .detail-image-td {
        padding: 0;
        width: 180px;
        height: 180px;
    }

    .detail-table .detail-table-image {
        object-fit: contain;
        margin: 0 0 0 0;
        padding: 0;
        width: 180px;
        height: 180px;
    }

    .detail-table .detail-btn-col {
        position: relative;
        height: 110px !important;
    }

    .detail-table .detail-btn-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: 1px solid rgba(0,0,0,.1) !important;
    }

.detail-table-add-button {
    float: right;
    width: 120px;
    height: 50px !important;
}

.detail-table-search {
    float: right;
    width: 300px;
    height: 50px !important;
    margin: 0px 15px 0px 15px
}

.detail-btn-col .detail-btn {
    position: absolute;
    padding: 10px;
    bottom: 0;
    right: 0;
}

.detail-btn-col .detail-content {
    margin: 5px 5px 25px 5px;
    overflow: hidden;
    max-height: 125px;
}

.detail-btn-row .detail-content {
    flex-grow: 1;
    margin: 0 50px 0 0;
}

.detail-btn-row .detail-btn {
    white-space: nowrap;
}


.dialog-container {
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.card-item {
    height: 80px;
    min-width: 250px;
    flex-grow: 1;
    margin: 2px;
    white-space: nowrap;
    display: inline-block;
    border: solid;
    border-width: 1px;
}

    .card-item .material-icons {
        font-size: 2.2em !important;
        margin: 20px 10px 20px 5px;
        padding: 0;
        float: left;
    }

    .card-item .card-content {
    }

        .card-item .card-content .card-key {
            font-size: 0.7em;
            font-style: italic;
            margin: 45px 0 0 0;
        }

        .card-item .card-content .card-value {
            font-size: 1.5em;
            font-weight: bold;
            margin: -55px 0 0 0;
        }

        .card-item .card-content .card-value-wrap {
            font-size: 1.0em;
            white-space: normal;
            display: flex;
            align-items: center;
        }

.dialog-container {
    max-width: 750px;
}

.dialog-container .image-container {
    object-fit: contain;
    width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}



.plc-table tr {
    height: 24px !important;
}


.result-tabs .rz-tabview-panel {
    padding: 0;
}


.mvs-dialog {
    width: 500px;
}

@media (max-width: 550px) {
    .mvs-dialog {
        width: 90vw;
        margin: 10px;
    }
}

img.resizable-image {
    max-width: 100%;
    max-height: 100%;
}

i.result-removal-icon {
    --result-removal-icon-size: 50pt;
    color: rgba(255, 0, 0, 0.5);
    font-size: var(--result-removal-icon-size);
    position: absolute;
    top: calc(50% - (var(--result-removal-icon-size) / 2) - 24pt - 0.5rem);
    left: calc(50% - (var(--result-removal-icon-size) / 2));
}

#image-in-view {
    position: absolute;
    cursor: grab;
    user-select: none;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.bumper-buttons {
    cursor: pointer;
    height: 100%;
    width: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.1s ease;
    background-color: rgba(0,0,0,0);
    z-index: 1;
}

.bumper-buttons:hover {
    background-color: rgba(0,0,0,0.04);
}

.close-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    height: 5rem;
    width: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.1s ease;
    background-color: rgba(0,0,0,0);
    z-index: 2;
    border-radius: 50%;
}

.close-button:hover {
    background-color: rgba(0,0,0,0.04);
}

.inspection-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-column-gap: 1rem;
    grid-row-gap: 1rem;
    margin-bottom: 2rem;
}

@media only screen and (max-width: 1550px) {
    .inspection-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 1320px) {
    .inspection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 1080px) {
    .inspection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 820px) {
    .inspection-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 768px) {
    .inspection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 566px) {
    .inspection-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}