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

.rdg-blocks .rdg-picks-vs {
    &.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;

        #wait {
            display: none;
            position: fixed;
            z-index: 1000;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            background: rgba( 255, 255, 255, .8 ) url('../../assets/images/spinner.gif') 50% 50% no-repeat;
        }
        
        .filter {
            gap: 1rem;
            display: flex;
            padding-bottom: 2rem;

            @media (max-width: $breakpoint-md) {
                & {
                    flex-direction: column;
                }
            }

            .categories {
                display: flex;
                align-items: center;
                justify-content: var(--category-align);

                &.w-100 {
                    width: 100%;
                    
                    .select {
                        @media (max-width: $breakpoint-md) {
                            & {
                                width: 60%;
                            }
                        }

                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                            }
                        }
                    }
                }

                &.w-50 {
                    width: 50%;

                    @media (max-width: $breakpoint-md) {
                        & {
                            width: 100%;
                            justify-content: center;
                            padding-bottom: 1rem;
                        }
                    }

                    .select {
                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                            }
                        }
                    }
                }

                .select {
                    width: var(--category-select-width);
                    display: flex;
                    position: relative;
                    border-radius: .5rem;
                    overflow: hidden;
                    box-shadow: 1px 5px 14px 0px rgb(0 0 0 / 15%);
                    min-height: 2rem;
            
                    &::after {
                        font-family: 'Font Awesome 5 Free';
                        content: '\f078';
                        display: flex;
                        position: absolute;
                        align-items: center;
                        justify-content: center;
                        top: 0;
                        right: 0;
                        width: 3rem;
                        height: calc(100% - .8rem);
                        color: var(--color-white);
                        background-color: var(--color-primary-dark-light);
                        pointer-events: none;
                        margin: .4rem;
                        border-radius: .5rem;
                    }
            
                    select {
                        border: 0;
                        outline: 0;
                        appearance: none;
                        box-shadow: none;
                        flex: 1;
                        padding: 14px;
                        cursor: pointer;
                        background-image: none;
                        color: var(--color-primary);
                        background-color: var(--color-white);
                        font-weight: 700;
                
                        /* Remove IE arrow */
                        &::-ms-expand {
                            display: none;
                        }
            
                        option {
                            font-weight: 700;
                        }
                    }
                }
            }

            .sub-categories {
                display: flex;
                align-items: center;
                justify-content: var(--sub-category-align);

                &.w-100 {
                    width: 100%;

                    @media (max-width: $breakpoint-md) {
                        & {
                            .buttons {
                                a {
                                    min-width: inherit;
                                    padding: .5rem 1rem;
                                }
                            }
                        }
                    }

                    @media (max-width: $breakpoint-sm) {
                        & {
                            .buttons {
                                width: 100%;
                                flex-direction: column;
                            }
                        }
                    }
                }

                &.w-50 {
                    width: 50%;

                    @media (max-width: $breakpoint-xl) {
                        & {
                            .buttons {
                                a {
                                    min-width: inherit;
                                    padding: .5rem 1rem;
                                }
                            }
                        }
                    }

                    @media (max-width: $breakpoint-md) {
                        & {
                            width: 100%;
                            justify-content: center;
                        }
                    }

                    .buttons {
                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                                flex-direction: column;
                            }
                        }
                    }
                }

                .buttons {
                    display: flex;
                    justify-content: var(--align);
                    flex-wrap: wrap;
                    gap: 1rem;
            
                    a {
                        padding: .8rem 1.5rem;
                        font-size: 1rem;
                        font-weight: 500;
                        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;
                        text-decoration: none;

                        i {
                            font-size: 1.2rem;
                            padding-left: .5rem;
                        }

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

                        &.link-default {
                            color: var(--rdg-picks-vs-btn-color);
                            background-color: var(--rdg-picks-vs-btn-default);
                            
                            &:hover {
                                color: var(--rdg-picks-vs-color-hover) !important;
                                background-color: var(--rdg-picks-vs-btn-hover);
                            }
                        }
                    }
                }
            }
        }

        @include title;

        .title {
            margin-left: .6rem;
        }

        .picks {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            gap: 1.2rem;

            @media (max-width: 1285px) {
                & {
                    justify-content: center;
                }
            }

            .message {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 1.5rem;
                border-radius: .5rem;
                background-color: var(--rdg-picks-vs-message-bg);
                border: 1px solid var(--rdg-picks-vs-message-border);

                span {
                    text-align: center;
                    color: var(--rdg-picks-vs-message);
                }
            }
    
            .pick {
                display: flex;
                flex-direction: column;
                width: 25rem;
                border-radius: .5rem;
                background-color: $color-white;
                padding-top: 1rem;
                padding-bottom: 2rem;
    
                @media (max-width: 450px) {
                    & {
                        width: 100%;
                        min-width: initial;
                    }
                }
    
                .pick-header {
                    display: flex;
                    flex-direction: column;
    
                    .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: flex-start;
                            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: 90px;
                                    max-height: 90px;
    
                                    @media (max-width: 450px) {
                                        & {
                                            max-width: 70px;
                                            max-height: 70px;
                                        }
                                    }
                                }
                            }
    
                            .team-name {
                                padding: .3rem;
                                text-align: center;
                                height: 100%;
                                display: flex;
                                align-items: 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: 1.7rem;
                                    width: 1.7rem;
                                    font-weight: 500;
                                    color: $color-white;
                                    border-radius: 50%;
                                    font-size: .9rem;
                                    background-color: var(--color-picks-vs-picks);
                                }
                            }
    
                            a {
                                width: 100%;
                            }
                            
                            .vs-name {
                                width: 100%;
                                display: flex;
                                justify-content: center;
                                border-radius: .3rem;
                                padding: .4rem;
                                background-color: var(--color-picks-vs-picks);
    
                                span {
                                    text-align: center;
                                    font-weight: 600;
                                    color: $color-white;
                                    text-transform: uppercase;
                                    font-size: .9rem;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

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