@import '../../../../assets/scss/abstracts/variables';
@import '../../../../assets/scss/abstracts/mixins';

.rdg-blocks .rdg-consensus {
    width: calc(var(--vw, 1vw) * 100);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 99.55vw;

    .container.content {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding-left: 20px;
        padding-right: 20px;

        @include title;

        .picks {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2rem;
    
            .pick {
                display: flex;
                flex-direction: column;
                width: 24rem;
                border-radius: .5rem;
                background-color: var(--color-consensus-pick-bg);
    
                @media (max-width: 450px) {
                    & {
                        width: 100%;
                        min-width: initial;
                    }
                }
    
                .pick-header {
                    display: flex;
                    flex-direction: column;

                    .title {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        min-height: 2.5rem;
                        border-top-left-radius: .5rem;
                        border-top-right-radius: .5rem;
                        border-bottom: .2rem solid;
                        color: var(--color-consensus-pick-title-color);
                        padding: .3rem;
                        text-align: center;
                        background-color: var(--color-consensus-title-bg);
                        border-color: var(--color-consensus-border);
                    }
                }
    
                .pick-body {
                    display: flex;
                    flex-direction: column;
                    
    
                    .teams {
                        display: flex;
                        padding: .5rem;
    
                        .team {
                            display: flex;
                            align-items: center;
                            justify-content: end;
                            flex-direction: column;
    
                            &:nth-last-of-type(1), &:nth-last-of-type(3) {
                                width: 38%;
                            }
    
                            &:nth-last-of-type(2) {
                                width: 24%;
                            }
    
                            .team-logo {
                                img {
                                    max-width: 100px;
                                    max-height: 100px;
    
                                    @media (max-width: $breakpoint-sm) {
                                        & {
                                            max-width: 80px;
                                            max-height: 80px;
                                        }
                                    }
                                }
                            }
                        }
    
                        .team-vs {
                            display: flex;
    
                            .vs-logo {
                                width: 100%;
                                height: 100%;
                                display: flex;
                                align-items: center;
                                justify-content: center;
    
                                span {
                                    display: flex;
                                    justify-content: center;
                                    align-items: center;
                                    height: 2rem;
                                    width: 2rem;
                                    font-weight: 500;
                                    color: $color-white;
                                    border-radius: 50%;
                                    font-size: 1.1rem;
                                    background-color: var(--color-primary-dark-light);
                                }
                            }
                        }
                    }
                    
                    .consensus {
                        display: flex;
                        justify-content: center;
                        color: var(--color-consensus-consensus-text);
                        background-color: var(--color-consensus-consensus);
                        padding: .3rem 0;
                    }

                    .sections {
                        display: flex;
                        flex-direction: column;
                        
                        .section {
                            display: flex;
                            flex-direction: column;
                            padding: .5rem 0;
                            border-bottom: 1px solid var(--color-consensus-section-border);

                            .header {
                                width: 100%;
                                display: flex;
                                flex-direction: row;
                                padding-bottom: .5rem;
                                color: var(--color-consensus-header);

                                .title {
                                    width: 29%;
                                    padding-left: .5rem;
                                }
    
                                .totals {
                                    width: 17%;
                                    text-align: right;
                                    padding-right: .5rem;
                                }
    
                                .public {
                                    width: 27%;
                                    text-align: center;
                                }
    
                                .sharp {
                                    width: 27%;
                                    text-align: center;
                                }
                            }

                            .data {
                                width: 100%;
                                display: flex;
                                flex-direction: row;
                                color: var(--color-consensus-data);

                                .leyend {
                                    width: 20%;
                                    display: flex;
                                    padding-left: .5rem;
                                    flex-direction: column;

                                    .leyend-items {
                                        display: flex;

                                        .value {
                                            padding-right: .5rem;
                                        }

                                        .title {
                                            color: var(--color-consensus-data-leyend-title);
                                        }
                                    }
                                }

                                .columns {
                                    width: 80%;
                                    display: flex;

                                    .totals, .public, .sharp {
                                        padding: 0 .5rem;
                                        border-right: 2px solid var(--color-consensus-columns-separate);

                                        .totals-items {
                                            width: 100%;
                                            display: flex;
                                            justify-content: space-between;

                                            .value, .title {
                                                width: auto;
                                            }

                                            &:first-of-type {
                                                .title {
                                                    color: var(--color-consensus-columns-values);
                                                }
                                            }
                                        }
                                    }
                                    
                                    .totals {
                                        width: 33%;
                                        text-align: center;
                                    }
        
                                    .public {
                                        width: 34%;
                                        text-align: center;
                                    }
        
                                    .sharp {
                                        width: 33%;
                                        text-align: center;
                                        border: none;
                                    }
                                }
                            }
                            
                        }
                    }
    

                    .picks-available {
                        display: flex;
                        align-items: center;
                        padding: .4rem 2rem;
                        border-bottom: 1px solid var(--color-consensus-section-border);
                        margin-bottom: .5rem;

                        i {
                            padding-right: .5rem;
                            color: var(--color-consensus-picks-color);
                        }

                        span {
                            color: var(--color-consensus-picks);
                            text-align: center;
                        }
                    }
                }

                .pick-footer {
                    display: flex;
                    justify-content: center;
                    padding: .3rem;
                    background-color: var(--color-consensus-footer);
                    border-bottom-left-radius: .5rem;
                    border-bottom-right-radius: .5rem;
    
                    @include link-style;
    
                    a {
                        font-weight: 600;
                        color: $color-white;
    
                        &:hover {
                            color: $color-primary;
                        }
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-consensus {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
