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

@property --color-shr-recaps-header-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-shr-recaps-header-color {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-shr-recaps-header-border {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-shr-recaps-game-team-vs {syntax: "<color>";inherits: true;initial-value: #00bc00;}
@property --color-shr-recaps-game-body {syntax: "<color>";inherits: true;initial-value: #dedede;}
@property --color-shr-recaps-game-score-bg {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-shr-recaps-game-stats-color {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-shr-recaps-game-stats-success {syntax: "<color>";inherits: true;initial-value: #00bc00;}
@property --color-shr-recaps-game-stats-info {syntax: "<color>";inherits: true;initial-value: #1eb5d0;}
@property --color-shr-recaps-game-stats-info-dark {syntax: "<color>";inherits: true;initial-value: #0056a1;}
@property --color-shr-recaps-content-title {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-shr-recaps-content-title-shadow {syntax: "<color>";inherits: true;initial-value: #0056a1;}

.shr-blocks .sh-recap {
    .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-shr-recaps-header-color);
                background-color: var(--color-shr-recaps-header-bg);
                border-bottom: 3px solid var(--color-shr-recaps-header-border);

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

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

                    .vs {
                        display: flex;
                        align-items: center;
                        color: var(--color-shr-recaps-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-shr-recaps-game-body);

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

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

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

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

                                .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: 7rem;
                                                max-height: 5rem;
                                            }
                                        }
                                    }
                                }

                                .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-shr-recaps-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-shr-recaps-game-stats-color);
                                        white-space: nowrap;

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

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

                            .team {
                                .team-name {
                                    .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-shr-recaps-game-stats-info-dark);
                        }
                    }
                }
            }
        }
    }
}

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