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

.rdg-blocks .rdg-table-leagues {
    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;

        .table {
            .filter {
                width: 100%;
                display: flex;
                gap: 1.5rem;

                @media (max-width: $breakpoint-sm) {
                    & {
                        gap: 1rem;
                        flex-direction: column;
                    }
                }

                .select {
                    min-width: 20rem;
                    display: flex;
                    position: relative;
                    overflow: hidden;
                    min-height: 2rem;
                    border-bottom: 2px solid var(--color-primary-dark-light);

                    @media (max-width: $breakpoint-lg) {
                        & {
                            min-width: 16rem;
                        }
                    }

                    @media (max-width: $breakpoint-md) {
                        & {
                            min-width: 12rem;
                        }
                    }
            
                    &::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-primary-dark-light);
                        font-weight: 700;
                        pointer-events: none;
                        margin: .4rem;
                    }
            
                    select {
                        border: 0;
                        outline: 0;
                        appearance: none;
                        box-shadow: none;
                        flex: 1;
                        padding: 1rem;
                        cursor: pointer;
                        background-image: none;
                        color: var(--color-black);
                        background-color: var(--color-gray);
                        font-weight: 700;
                        text-align: center;

                        @media (max-width: $breakpoint-md) {
                            & {
                                padding: .5rem;
                            }
                        }
                
                        /* Remove IE arrow */
                        &::-ms-expand {
                            display: none;
                        }
            
                        option {
                            font-weight: 700;
                        }
                    }
                }

                .button {
                    background-color: var(--color-primary-dark-light);
                    color: var(--color-white);
                    padding: 1rem 2.5rem;
                    font-weight: 600;

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

                    @media (max-width: $breakpoint-sm) {
                        & {
                            text-align: center;
                        }
                    }
                }
            }

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

                .item {
                    width: 100%;
                    display: flex;
                    flex-direction: row;
                    border-bottom: 1px solid var(--color-table-leagues-item-border);
                    padding: .8rem 0;

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

                    &:last-of-type {
                        border-bottom: none;
                    }

                    .date {
                        width: 15%;
                        display: flex;
                        align-items: center;

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

                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                                justify-content: center;
                                flex-direction: row;
                            }
                        }

                        .date {
                            width: auto;
                            margin-right: .5rem;
                        }

                        .type {
                            width: auto;
                        }
                    }

                    .teams {
                        width: 30%;
                        display: flex;
                        align-items: center;
                        justify-content: center;

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

                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                                justify-content: center;
                                flex-direction: row;
                            }
                        }

                        .team-home {
                            color: var(--color-table-leagues-team);
                        }

                        .team-vs {
                            margin: 0 .5rem;
                        }

                        .team-visitor {
                            color: var(--color-table-leagues-team);
                        }
                    }

                    .results {
                        width: 35%;
                        display: flex;
                        align-items: center;
                        justify-content: center;

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

                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                                justify-content: center;
                                flex-direction: row;
                            }
                        }

                        span {
                            margin: 0 1rem;

                            &:first-of-type {
                                margin-left: 0;
                            }

                            &:last-of-type {
                                margin-right: 0;
                            }

                            @media (max-width: $breakpoint-md) {
                                & {
                                    margin: 0;
                                }
                            }

                            @media (max-width: $breakpoint-sm) {
                                & {
                                    margin: 0 .3rem;

                                    &:first-of-type {
                                        margin-left: 0;
                                    }

                                    &:last-of-type {
                                        margin-right: 0;
                                    }
                                }
                            }
                        }
                    }

                    .units {
                        width: 10%;
                        display: flex;
                        align-items: center;
                        justify-content: center;

                        @media (max-width: $breakpoint-md) {
                            & {
                                width: 15%;
                            }
                        }

                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                                justify-content: center;
                                flex-direction: row;
                            }
                        }
                    }

                    .status {
                        width: 10%;
                        display: flex;
                        justify-content: flex-end;
                        align-items: center;

                        @media (max-width: $breakpoint-md) {
                            & {
                                width: 20%;
                            }
                        }

                        @media (max-width: $breakpoint-sm) {
                            & {
                                width: 100%;
                                justify-content: center;
                                flex-direction: row;
                                padding-top: .5rem;
                            }
                        }

                        span {
                            border-radius: .2rem;
                            padding: .5rem 2rem;
                            background-color: var(--color-table-leagues-button);
                            color: var(--color-white);
                        }
                    }
                }
            }
        }
    }
}

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