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

.rdg-blocks .rdg-game {
    .content {
        width: 100%;
        display: flex;
        flex-direction: column;

        .game {
            display: flex;
            flex-direction: column;

            .game-header {
                padding: 1rem;
                display: flex;
                align-items: center;
                flex-direction: column;
                border-top-right-radius: 1.2rem;
                border-top-left-radius: 1.2rem;
                color: var(--color-game-header-color);
                background-color: var(--color-game-header-bg);
                border-bottom: 3px solid var(--color-game-header-border);

                .teams {
                    gap: .8rem;
                    display: flex;
                    flex-direction: row;
                    text-align: center;

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

                    .vs {
                        color: var(--color-game-team-vs);
                    }
                }

                .date {
                    text-align: center;

                    @media (max-width: $breakpoint-sm) {
                        & {
                            margin-top: .5rem;
                        }
                    }
                }
            }

            .game-body {
                display: flex;
                justify-content: center;
                padding: 1rem 1rem 2rem 1rem;
                border-bottom-left-radius: 1.2rem;
                border-bottom-right-radius: 1.2rem;
                background-color: var(--color-game-body);

                .content-body {
                    width: 80%;
                    
                    @media (max-width: $breakpoint-lg) {
                        & {
                            width: 100%;
                        }
                    }

                    .content-teams {
                        width: 100%;
                        display: flex;
                        margin-bottom: .5rem;

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

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

                        .team-home, .team-visitor {
                            width: 50%;
                            display: flex;
                            flex-direction: column;
                            margin: 1.5rem 0;

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

                            .team {
                                display: flex;

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

                                .team-name {
                                    display: flex;
                                    flex-direction: column;

                                    @media (max-width: $breakpoint-md) {
                                        & {
                                            width: 100%;
                                            align-items: center;
                                            margin-top: 1rem;
                                        }
                                    }

                                    .city {
                                        //
                                    }
                                    
                                    .name {
                                        //
                                    }
                                }

                                .team-logo {
                                    @media (max-width: $breakpoint-md) {
                                        & {
                                            width: 100%;
                                            min-height: 5rem;
                                            display: flex;
                                            justify-content: center;
                                            align-items: center;
                                            margin-top: 1rem;
                                        }
                                    }

                                    img {
                                        max-width: 10rem;
                                        max-height: 6rem;

                                        @media (max-width: $breakpoint-lg) {
                                            & {
                                                max-width: 8rem;
                                                max-height: 5rem;
                                            }
                                        }

                                        @media (max-width: $breakpoint-md) {
                                            & {
                                                max-width: 6rem;
                                                max-height: 4rem;
                                            }
                                        }

                                        @media (max-width: $breakpoint-sm) {
                                            & {
                                                max-width: 10rem;
                                                max-height: 8rem;
                                            }
                                        }
                                    }
                                }

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

                                    .score {
                                        display: flex;
                                        justify-content: center;
                                        align-items: center;
                                        width: 3.8rem;
                                        height: 3.8rem;
                                        border-radius: 50%;
                                        background-color: var(--color-game-score-bg);

                                        @media (max-width: $breakpoint-md) {
                                            & {
                                                width: 3rem;
                                                height: 3rem;
                                            }
                                        }
                                    }
                                }

                                .stats {
                                    margin-top: 2rem;

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

                                    .pill {
                                        padding: .6rem 1.5rem;
                                        border-radius: 2rem;
                                        color: var(--color-game-stats-color);
                                        white-space: nowrap;

                                        &.success {
                                            background-color: var(--color-game-stats-success);
                                        }
                                        
                                        &.info {
                                            background-color: var(--color-game-stats-info);
                                        }
                                    }
                                }
                            }
                        }

                        .team-home {
                            align-items: flex-end;

                            .team {
                                .team-name {
                                    .city, .name {
                                        text-align: right;
                                    }
                                }
                                
                                .team-logo {
                                    padding-left: .7rem;

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

                                .team-score {
                                    padding-left: 1.5rem;

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

                            .stats {
                                justify-content: flex-start;
                            }

                        }

                        .team-separator {
                            width: 1px;
                            margin: 0 1.5rem;
                            border-left: 1px solid var(--color-white);
                            border-right: 1px solid var(--color-white);

                            @media (max-width: $breakpoint-md) {
                                & {
                                    margin: 0 1rem;
                                }
                            }
                        }
                        
                        .team-visitor {
                            align-items: flex-start;

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

                                .team-logo {
                                    padding-right: .7rem;

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

                                .team-score {
                                    padding-right: 1.5rem;

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

                    .content-stats {
                        display: flex;
                        justify-content: center;
                        margin-top: 1.8rem;

                        @media (max-width: $breakpoint-sm) {
                            & {
                                margin-top: 1rem;
                            }
                        }
                        
                        .pill {
                            width: 12rem;
                            padding: .6rem 1.5rem;
                            border-radius: 2rem;
                            white-space: nowrap;
                            color: var(--color-white);
                            background-color: var(--color-game-stats-info-dark);
                        }
                    }
                }
            }
        }
    }
}

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