/* Donut chart */
@keyframes render {
    0% {
        stroke-dasharray: 0 100;
    }
}

.canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
}

.legend {
    margin: 0 30px;
}

.title {  
    font-size: 18px;
    line-height: 21px;
}

.caption-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: auto auto;
}

.caption-item {
    position: relative;
    height: 15px;
    margin: 10px 0;
    padding-left: 24px;
    padding-right: 20px;
    font-size: 16px;
    line-height: 18px;
    cursor: pointer;
}

.caption-item:hover,
.hovered1 {
    opacity: 0.5;
    transition: all 0.5s;
}

.caption-item::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 8px;
}

.caption-item:nth-child(1)::before {
    background-color: #0F3CC1;
}

.caption-item:nth-child(2)::before {
    background-color: #699cc1;
}

.caption-item:nth-child(3)::before {
    background-color: #d44392;
}

.caption-item:nth-child(4)::before {
    background-color: #f8faa0;
}

.caption-item:nth-child(5)::before {
    background-color: #3ace87;
}

.unit {
    fill: none;
    stroke-width: 5;
    cursor: pointer;
    animation-name: render;
    animation-duration: 1s;
    transition: all 0.5s; 
}

.unit:hover,
.hovered {
    /* opacity: 0.5; */
    stroke-width: 5.3;
    transition: all 0.5s;
    filter: saturate(2);
}

.unit:nth-child(1) {
    stroke: #0F3CC1;
    stroke-dasharray: 10 100;
}

.unit:nth-child(2) {
    stroke: #699cc1;
    stroke-dasharray: 22 100;
    stroke-dashoffset: -10;
}

.unit:nth-child(3) {
    stroke: #d44392;
    stroke-dasharray: 15 100;
    stroke-dashoffset: -32;
}

.unit:nth-child(4) {
    stroke: #f8faa0;
    stroke-dasharray: 30 100;
    stroke-dashoffset: -47;
}

.unit:nth-child(5) {
    stroke: #3ace87;
    stroke-dasharray: 23 100;
    stroke-dashoffset: -77;
}

@media(max-width: 1200px) {
    .caption-list {
        display: flex;
        flex-direction: column;
    }

}

@media(max-width: 775px) {
    .caption-list {
        display: flex;
        flex-direction: column;
    }
    .legend {
        margin: 0;
    }
    .caption-item {
        height: unset;
        text-overflow: ellipsis;
        overflow: hidden;
    }

}