.line-item {
    min-width: calc((100% - 90px)/4);
    width: calc((100% - 90px)/4);
    overflow: hidden;

    .top-content {
        border: 0.5px solid black;
        box-sizing: border-box;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),
            0 6px 20px 0 rgba(0, 0, 0, 0.19);
        height: 90%;
    }

    .bounding {
        margin: 10px;

        .line {
            margin-bottom: 10px;

            .line-title {
                font-weight: 500;
            }

            .line-value {
                font-weight: bold;
            }
        }
    }

    .scroll-chart {
        overflow-x: hidden;
        overflow-y: auto;
        height: 67%;
        margin-top: 26px;
        background-color: antiquewhite;
    }

    .container-chart {
        margin: 10px;
        width: calc(100% - 20px);
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        margin-top: 15px;

        .chart-item {
            height: 420px;
            width: 100%;
            overflow: hidden;

            .title-chart {
                font-weight: bold;
            }

            .chart-container {
                width: 100%;
                height: 410px;

                .chart-detail {
                    width: 100%;
                    height: 100%;
                    background-color: var(--background-common)
                }
            }
        }
    }
}

.history {
    margin-top: 20px;
    display: flex;
    justify-content: end;
    z-index: 1;

    .history-button {
        display: inline-flex;
        align-items: center;
        padding: 8px 15px;
        border: 1px solid #cccccc;
        border-radius: 6px;
        background-color: #007bff;
        color: white;
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s ease, border-color 0.2s ease;
        outline: none;
        margin-right: 25px;
        z-index: 0;
    }

    .history-button:hover {
        cursor: auto;
        opacity: 0.8;
    }
}


.history-table {
    width: 750px;
    overflow: hidden;
    background-color: #fdfdfd;
}

/* Abnormal History Table */
.history-table-data {
    border-collapse: collapse;
    font-family: sans-serif;
    margin-top: 10px;
    height: 164px;
    table-layout: fixed;
    width: 735px;
    position: relative;
    border: 1px solid #ddd;

    .common-row {
        display: flex;
        width: 100%;
        height: 40px;
        justify-content: space-between;
        border-bottom: 1px solid #ddd;
        background-color: white;
        color: #333;

        &.NG {
            background-color: #c71717;
            color: white;
        }
    }

    .header-table {
        background-color: #f5f5f5;
        border-bottom: 1px solid #ddd;
        width: 100%;
    }

    .cell {
        display: flex;
        height: 100%;
        border-right: 1px solid #ddd;
        align-items: center;

        &.date {
            padding-left: 20px;
            width: 35%;
        }

        &.step {
            width: 30%;
            padding-left: 20px;
        }

        &.contents {
            width: 35%;
            padding-left: 20px;
        }

        .title-span {
            font-size: 15px;
            font-weight: 600;
        }
    }

    .body-data {
        width: 100%;
        display: flex;
        flex-direction: column;
        height: 123px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        margin: 0;
    }

    .common-span {
        align-self: center;
        text-align: left;
        height: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .empty-row {
        font-size: 14px;
        height: 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 1px solid #ddd;
    }
}

@media only screen and (min-width: 1920px) and (max-height: 912px) {
    .detail-grid {
        .container-selection {
            .content {
                .cotainer-list {
                    .list-items {
                        .top-content {
                            .scroll-chart {
                                .container-chart {
                                    .chart-item {
                                        height: 300px;

                                        .chart-container {
                                            height: 290px;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}