body {
    margin: 0;
}

.stockGreen {
    color:  rgb(19, 115, 51);
    background-color: rgb(230, 244, 234);
}
.stockRed {
    color: rgb(165, 14, 14);
    background-color: rgb(252, 232, 230);
}

.chart-and-legend {
    width: 90%;
    margin: auto;

    #recent-tickers {
        text-align: center;
        width: 80%;
        max-width: 600px;
        margin: 0 auto 10px auto;
    }

    .legend {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 80%;
        max-width: 600px;
        margin: 20px auto;
    
        .legend-container {
            display: flex;
            flex-direction: column;
    
            &:first-child {
                border-bottom: 1px solid rgb(218, 220, 224);
                padding-bottom: 10px;
            }
            &:last-child {
                padding-top: 10px;
            }
    
            .legend-row {
                display: grid;
                grid-template-columns: auto auto auto;
    
                &:last-child {
                    display: flex;
                    flex-direction: column;
                    margin-left: 15px;
                }
                
                .legend-title {
                    position: relative;
                    padding-left: 10px;
                    width: 140px;
                    margin: auto 0;
        
                    &.market {
                        &::before {
                            background-color: rgb(66, 133, 244);
                        }
                    }
                    &.stock {
                        &::before {
                            background-color: rgb(254, 199, 111);
                        }
                    }
                
                    &::before {
                        content: "";
                        position: absolute;
                        width: 3px;
                        height: 80%;
                        top: 0;
                        bottom: 0;
                        left: 0;
                        margin: auto;
                        border-radius: 25px;
                    }
                }
        
                .legend-price {
                    text-align: right;
                    margin: auto 0;
                }
        
                .legend-return {
                    width: fit-content;
                    margin-left: auto;
                    padding: 5px 10px;
                    border-radius: 8px;
                }
            }
        }
    }
}

.factors-title {
    width: fit-content;
    padding: 5px 15px;
    border-radius: 8px;

    &.positive {
        color: rgb(19, 115, 51);
        background-color: rgb(230, 244, 234);
    }
    &.negative {
        color: rgb(165, 14, 14);
        background-color: rgb(252, 232, 230);
    }
}