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

.rdg-blocks .rdg-sports-picks {
    width: 100%;

    .title {
        width: 100%;
        padding-top: .5rem;
        padding-left: .5rem;
        padding-right: .5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .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;
                }

                .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;

                .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;
                            }
                        }

                        .vs-name {
                            width: 100%;
                            display: flex;
                            justify-content: center;
                            border-radius: .3rem;
                            padding: .4rem;

                            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 {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;

        .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;
            }
        }
    }
}
