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

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

        .container.content {
            padding-left: 20px;
            padding-right: 20px;
        }
    }

    .container.content {
        width: 100%;
        display: flex;
        flex-direction: column;

        @include title;
        
        .picks {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1.2rem;

            .pick {
                display: flex;
                flex-direction: column;
                width: 20rem;
                border-radius: .5rem;
                background-color: $color-white;

                @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: $color-white;
                        padding: .3rem;
                        text-align: center;
                        background-color: var(--color-rdg-sports-picks-title-bg) !important;
                        border-color: var(--color-rdg-sports-picks-title-border) !important;
                    }

                    .content {
                        width: 100%;
                        display: flex;
                        padding: .5rem;

                        .sport {
                            width: 20%;
                        }

                        .date-time {
                            width: 60%;
                            display: flex;
                            justify-content: center;
                            text-align: center;
                        }

                        .status {
                            width: 20%;
                            display: flex;
                            justify-content: end;
                        }
                    }
                }

                .pick-body {
                    display: flex;
                    flex-direction: column;
                    padding: 0 .5rem .8rem .5rem;

                    .teams {
                        display: flex;

                        .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: 80px;
                                    max-height: 80px;

                                    @media (max-width: $breakpoint-sm) {
                                        & {
                                            max-width: 60px;
                                            max-height: 60px;
                                        }
                                    }

                                    @media (max-width: 450px) {
                                        & {
                                            max-width: 40px;
                                            max-height: 40px;
                                        }
                                    }
                                }
                            }

                            .team-name {
                                padding: .3rem;
                                text-align: center;
                            }
                        }

                        .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-rdg-sports-picks-vs-logo);
                                }
                            }

                            .vs-name {
                                width: 100%;
                                display: flex;
                                justify-content: center;
                                border-radius: .3rem;
                                padding: .4rem;
                                background-color: var(--color-rdg-sports-picks-vs-name);

                                span {
                                    text-align: center;
                                    font-weight: 600;
                                    color: $color-white;
                                    text-transform: uppercase;
                                    font-size: .9rem;
                                }
                            }
                        }
                    }

                    .numbers {
                        display: flex;
                        flex-direction: column;
                        text-align: center;
                        margin-top: 1rem;

                        .number {
                            border-top: 1px solid $color-gray-line;
                            min-height: 2rem;
                            padding: .4rem 0;
                            
                            &:last-of-type {
                                border-bottom: 1px solid $color-gray-line;
                            }
                        }
                    }
                }

                .pick-footer {
                    display: flex;
                    justify-content: end;
                    padding: 1rem .5rem .5rem .5rem;
                    margin-top: auto;

                    @include link-style;

                    a {
                        font-weight: 600;
                        color: $color-primary-dark-light;

                        &:hover {
                            color: $color-primary;
                        }
                    }
                }
            }
        }

        .buttons {
            padding-top: 1rem;
            display: flex;
            justify-content: center;
            gap: 1rem;

            @media (max-width: 350px) {
                & {
                    flex-direction: column;
                }
            }

            a {
                margin-top: 1rem;
                padding: .8rem 1.5rem;
                font-size: 1rem;
                font-weight: 500;
                //margin-right: 1rem;
                color: var(--color-white);
                border-radius: .4rem;
                min-width: 10rem;
                text-align: center;
                display: flex;
                justify-content: center;
                align-items: center;
                transition: .2s background-color ease-in-out, .2s color ease-in-out, .2s border-color ease-in-out, .2s opacity ease-in-out, .2s box-shadow ease-in-out;
                
                &.link-success {
                    border-top: 3px solid var(--color-success-light);
                    background-color: var(--color-success);
                }

                &.link-warning {
                    border-top: 3px solid var(--color-warning-light);
                    background-color: var(--color-warning);
                }

                &.link-danger {
                    border-top: 3px solid var(--color-danger-light);
                    background-color: var(--color-danger);
                }

                &.link-default {
                    color: var(--color-primary);
                    border: 2px solid var(--color-primary);
                    background-color: var(--color-gray);
                }

                &:last-of-type {
                    @media (max-width: $breakpoint-sm) {
                        & {
                            margin-top: 0;
                        }
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-sports-picks {
        &.full {
            width: 100%;
            position: initial;
            left: initial;
            right: initial;
            margin-left: initial;
            margin-right: initial;
            max-width: initial;
        }

        .picks {
            .pick {
                .pick-header {
                    .title {
                        background-color: $color-primary-dark-light;
                        border-color: $color-primary;
                    }
                }

                .pick-body {
                    .teams {
                        .team-vs {
                            .vs-logo {
                                span {
                                    background-color: $color-primary-dark-light;
                                }
                            }

                            .vs-name {
                                background-color: $color-primary-dark-light;
                            }
                        }
                    }
                }
            }
        }

        .buttons {
            a {
                text-decoration: none;
            }
        }
    }
}
