// general styles
.chart-line-style .custom-tooltip,
.chart-doughnut-style .custom-tooltip {
    border-radius: 6px;
    position: absolute;
    transition: all .1s ease;
    z-index: 10;
 }

.chart-line-style .custom-tooltip:hover,
.chart-doughnut-style .custom-tooltip:hover {
    display: block !important;
}

.chart-line-style .custom-tooltip::after,
.chart-doughnut-style .custom-tooltip::after {
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: all;
    border: solid transparent;
    border-color: transparent;
}

// Line Chart 
.chart-line-style {
    position: relative;
    .chartLineHeader {
        display: flex;
        .chartLineHeader-title {
            width: 50%;
        }
        .chartLineHeader-input {
            width: 30%;
            text-align: right;
        }
        .chartLineHeader-button {
            width: 20%;
            text-align: right;
            .calendar-base {
                right: 0;
            }
            .toggle-button-group{
                .MuiToggleButton-root {
                    padding: 6px 13px;
                    font-size: 14px;
                    font-weight: 400;
                    line-height: normal;
                }
                .MuiToggleButton-root.Mui-selected {
                    border-radius: 8px;
                    z-index: 10;
                }
                .MuiToggleButton-root:not(.Mui-selected):first-of-type {
                    margin-right: -5px;
                    border-right: none;
                }
                .MuiToggleButton-root:not(.Mui-selected):last-of-type {
                    margin-left: -5px;
                    border-left: none;
                }
                .MuiToggleButtonGroup-groupedHorizontal:not(:first-child) {
                    margin: 0;
                }
            }
        }                  
    }
    
    .custom-tooltip {
        transform: translate(-50%, -120%);

        table {
            tr:last-child td {
                padding-bottom: 10px;
            }
            td {
                padding: 2px 10px;
                font-size: 12px;
                font-family: 'Roboto', sans-serif;
                font-weight: 400;
            }  
            .chart-line-tooltip-title {
                td { 
                    padding: 10px;
                }
                .bold {
                    font-weight: 600;
                }
            }
            .chart-line-tooltip-gray-text {
                padding: 0;
            }         
        }
    }
    
    .custom-tooltip:after {
        top: 100%;
        left: 50%;
        border-top-color: inherit;
        border-width: 12px;
        margin-left: -12px;
    }
    
}

// Doughnut Chart
.chart-doughnut-wrapper {
    .chart-doughnut-style {
        position: relative;
        .inner-container {
            text-align: center;
            .inner-background,
            .inner-content {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);             
            } 
            .inner-content {
                width: 95%;
                .title, .text {
                    display: block;
                }
                .title {
                    font-family: 'Poppins', 'Montserrat',  sans-serif;
                    font-size: 16px;
                    font-weight: 600;
                }
                .text {
                    font-size: 12px;
                    font-weight: 400;
                }
            }
        }
        .custom-tooltip {
            transform: translate(0%, 0%);
            font-size: 12px;
            .legend-line {
                padding: 5px 0;
                div {
                    padding: 5px;
                }
            } 
        }
        .custom-tooltip:after {
            top: 50%;
            margin-top: -6px;
            border-width: 6px;
        }

        .left-arrow {
            transform: translate(5%, -50%);
        }
        .left-arrow:after {
            right: 100%;
            border-right-color: inherit;
        }
        .right-arrow {
            transform: translate(-105%, -50%);
        }
        .right-arrow:after {
            left: 100%;
            border-left-color: inherit;
        }
    }
    
    .legend-wrapper {
        font-size: 14px;
        .legend-line {
            padding: 5px 0;
            .icon {
                width: 10%;            
            }
            .label {
                width: 50%;
            }
            .value {
                text-align: right;
                width: 40%;
            }
        }
    }

    .legend-wrapper .legend-line,
    .custom-tooltip .legend-line {
        display: flex;
        flex-direction: row;
        align-items:center;
        .icon span {
            display: block;
            width: 10px;
            height: 12px;
            border-radius: 6px; 
        }
        .value {
            font-weight: 700;
        }
    }
}
