@import "./styles.css";

body {
    display: flex;
}

main {
    width: 100%;
}

main > #filterPopUp {
    display: none;
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc((100% - 30rem) / 2);
    left: calc((100% - 30rem) / 2);
    width: 30rem;
    height: 30rem;
    z-index: 1000;
    border: 1px solid black;
    box-shadow: rgba(0,0,0, 0.4) 10px 10px;
    padding: 2rem;
}

main > #filterPopUp > div:not(.popup-buttons) {
    width: 100%;
    height: 100%;
}

main > #filterPopUp > div > table > tbody > tr {
    height: 3rem;
}

main > #filterPopUp > div > table > tbody > tr > td:last-child {
    width: 70%;
}

main > #filterPopUp > .popup-buttons {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.main-toolbar {
    display: none;
}

main.mainContent {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    flex-direction: row;
    background: var(--background-color);
}

main > #machine {
    flex-wrap: wrap;
    flex-basis: 21%;
    height: 70%;
    overflow: auto;
}

#machine > img {
    height: 200px;
    padding: 1%;
    max-height: 18vh;
    max-width: 100%;
}

#machine > .description {
    background-color: var(--list-view-header-color);
    width: 100%;
    margin: 0;
    padding-inline: 1vh;
    box-sizing: border-box;
    /* display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap; */
    box-shadow: 1px 1px 2px rgb(0, 0, 0, 0.3);
    border-radius: 5px;
    position: sticky;
    top: 0;
}

    #machine > .description > * {
        margin: 0;
        flex-basis: 100%;
    }

    #machine > .description > span {
        display: flex;
        justify-content: space-between;
    }

        #machine > .description > span > p {
            margin-block: 0.5rem;
        }

main > #machine > #details > * {
    box-sizing: border-box;
    padding-inline: 1vh;
}

table {
    width: 100%;
    border-spacing: 0;
    display: table !important;
}

    table td {
        padding: 0;
        font-size: 14px;
    }

main > #machine > #details table th {
    width: 100%;
    text-align: left;
    font-weight: 500;
    padding-block-end: 1rem;
}

main > #machine > #details table td {
    width: 50%;
    border-bottom: solid 1px rgb(200, 200, 200);
    padding: 1px;
}

    main > #machine > #details table td:last-of-type {
        color: black;
        text-align: end;
    }

    main > #machine > #details table td:first-of-type {
        color: rgb(80, 80, 80);
    }

main > #charts {
    flex-basis: 77.5%;
    height: 70%;
    min-width: 700px;
    max-width: 100vw;
    max-height: 80vh;
}

#charts > #actions {
    position: absolute;
    z-index: 1;
}

.button.glyphicons {
    font-size: 1.2rem;
    color: var(--primary-color);
    user-select: none;
}

    .button.glyphicons:hover {
        cursor: pointer;
        font-weight: 1000;
        color: var(--link-hover-color);
    }

main > #measured {
    flex-basis: 99%;
    height: 27%;
    overflow-x: hidden;
}

    main > #measured:has(.button.closed) {
        overflow-y: scroll;
        height: 27%;
    }

    main > #measured:has(.button.open) {
        overflow-y: visible;
        height: 100%;
    }

#measured table {
    width: 100%;
    border-spacing: 0;
    box-sizing: border-box;
}

.status0 table {
    border-left: solid 8px #48a43f;
}

.status1 table {
    border-left: solid 8px #ffaa00;
}

.status2 table {
    border-left: solid 8px red;
}

.status3 table {
    border-left: solid 8px lightblue;
}

.status4 table {
    border-left: solid 8px #bfef45;
}

#measured table .button#extend {
    position: absolute;
    right: 5px;
}

#measured > table > tbody > tr > * {
    text-align: center;
}

#measured > table > tbody > tr:nth-of-type(even) {
    background-color: var(--list-view-even-color);
}

#measured > table > tbody > tr:nth-of-type(odd) {
    background-color: var(--list-view-odd-color);
}

#measured > table > tbody > tr > td:not(:first-of-type) {
    border-left: solid 1px rgb(140, 140, 140);
}

#measured > table > tbody > tr:not(:first-of-type):hover > td > table {
    background-color: var(--list-view-hover-color) !important;
}

#measured > table > tbody > tr:first-of-type {
    position: sticky;
    top: 0;
    background-color: var(--list-view-header-color);
    box-shadow: 1px 1px 2px rgb(0 0 0 / 30%);
}

    #measured > table > tbody > tr:first-of-type > td:first-of-type {
        color: white;
        font-weight: 1000;
    }

    #measured > table > tbody > tr:first-of-type > td:first-of-type {
        font-weight: 700;
    }

#measured table > tbody > * {
    text-align: center;
}

#measured > table > tbody > tr:first-of-type tr {
    color: #333;
}

    #measured > table > tbody > tr:first-of-type tr:first-of-type {
        font-size: 1.1rem;
        font-weight: 600;
    }

main > * {
    box-sizing: border-box;
    box-shadow: 1px 1px 3px rgb(0 0 0 / 30%);
    border-radius: 2px;
    margin-block-start: 1vh;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
}

main > #charts {
    padding: 1vh;
}

#chart {
    width: 100%;
    height: 100%;
}

h3 {
    margin-block: 1rem;
}

select,
input {
    box-sizing: border-box;
    background: white;
}

select, input {
    width: 100%;
}

    select:not(#chooseServiceObject) {
        width: 16rem;
    }


.info-container {
    display: none;
    padding: 10px;
    padding-top: 0;
}

.info-container.active {
    display: block;
}

.info-container > ul {
    list-style-type: none;
    padding: 0;
}

.info-container > ul > li {
    display: flex;
    padding: 10px;
    border: solid 1px black;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
}

.info-container > ul > li:hover {
    background-color: #f0f0f0;
}

.info-container > ul > li::before {
    content: "";
    width: 6px;
    margin-right: 4px;
}

#selected-equipment {
    display: flex;
    padding: 10px;
    /*border: solid 1px black;*/
    border-radius: 5px;
    margin-top: 10px;
}

#selected-equipment p {
    margin: 0;
}

#selected-equipment td {
    padding: 5px;
    border-bottom: solid 1px rgb(200, 200, 200);

}

#selected-equipment > div {
    display: flex;
    flex-direction: column;
    overflow: auto;
}

#selected-equipment::before {
    content: "";
    width: 6px;
    margin-right: 4px;
}

.status0::before {
    background-color: #48a43f;
}

.status1::before {
    background-color: #ffaa00;
}

.status2::before {
    background-color: red;
}

.status3::before {
    background-color: lightblue;
}

.status4::before {
    background-color: #bfef45;
}

.back-button {
    margin-top: 10px;
    cursor: pointer;
    color: blue;
    text-decoration: inherit;
}
.back-button:hover {
    text-decoration: underline;
    color: #ff8f30 !important;
}