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

@property --color-game-top-handicapper-inner-bg {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-game-top-handicapper-inner-border {syntax: "<color>";inherits: true;initial-value: #cccccc;}
@property --color-game-top-handicapper-title-color {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-game-top-handicapper-header-name {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-game-top-handicapper-header-separator {syntax: "<color>";inherits: true;initial-value: #cccccc;}
@property --color-game-top-handicapper-header-cat {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-game-top-handicapper-game-color {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-game-top-handicapper-game-border {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-game-top-handicapper-game-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-game-top-handicapper-game-body {syntax: "<color>";inherits: true;initial-value: #f1f1f1;}
@property --color-game-top-handicapper-list-game-time {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-game-top-handicapper-list-game-amount {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-game-top-handicapper-footer-bg {syntax: "<color>";inherits: true;initial-value: #cccccc;}
@property --color-game-top-handicapper-footer-color {syntax: "<color>";inherits: true;initial-value: #111111;}

.shg-blocks .shg-game-top-handicapper {
    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;

        .inner-content {
            width: 100%;
            border-radius: 1rem;
            padding: 1.5rem 2.5rem;
            background-color: var(--color-game-top-handicapper-inner-bg);
            border: 1px solid var(--color-game-top-handicapper-inner-border);

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

            .top-header {   
                .top-title {
                    width: 100%;
                    display: flex;
                    color: var(--color-game-top-handicapper-title-color);
                    scroll-margin-top: 4rem;

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

            .top-content {
                width: 100%;
                display: flex;
                margin-top: 1.2rem;
                gap: 1.5rem;

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

                @media (max-width: $breakpoint-sm) {
                    & {
                        flex-direction: column;
                    }
                }
                
                .top-capper {
                    width: 15%;
                    display: flex;
                    justify-content: flex-start;
                    align-items: flex-start;

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

                    img {
                        width: 100%;
                        max-height: 12rem;
                        border-radius: 50%;

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

                .top-body {
                    width: 85%;
                    display: flex;
                    gap: 2rem;
                    justify-content: space-between;

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

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

                    .body-header {
                        width: 60%;

                        @media (max-width: $breakpoint-xl) {
                            & {
                                width: 55%;
                            }
                        }

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

                        .header {
                            display: flex;
                            justify-content: space-between;
                            margin-bottom: 1rem;

                            @media (max-width: $breakpoint-md) {
                                & {
                                    gap: .8rem;
                                    flex-direction: column;
                                    align-items: center;
                                }
                            }

                            .body-header-capper {
                                .name {
                                    color: var(--color-game-top-handicapper-header-name);
                                }

                                .separator {
                                    color: var(--color-game-top-handicapper-header-separator);
                                    margin: 0 .3rem;
                                }

                                .cat {
                                    color: var(--color-game-top-handicapper-header-cat);
                                }
                            }
                        }
                    }

                    .games {
                        width: 40%;
                        display: flex;
                        gap: 1rem;
                        justify-content: end;

                        @media (max-width: $breakpoint-xl) {
                            & {
                                width: 45%;
                            }
                        }

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

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

                            .game-title {
                                width: 100%;
                                display: flex;
                                justify-content: center;
                                text-align: center;
                                padding: .3rem;
                                border-top-left-radius: .7rem;
                                border-top-right-radius: .7rem;
                                color: var(--color-game-top-handicapper-game-color);
                                border-bottom: 2px solid var(--color-game-top-handicapper-game-border);
                                background-color: var(--color-game-top-handicapper-game-bg);
                            }

                            .game-body {
                                background-color: var(--color-game-top-handicapper-game-body);

                                .list-games {
                                    width: 100%;
                                    display: flex;
                                    gap:.5rem 2.5rem;
                                    padding: 1rem 2rem;
                                    flex-wrap: wrap;
                                    justify-content: space-between;

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

                                    .list-game {
                                        display: flex;
                                        justify-content: space-between;
                                        width: calc(100% / 2 - 1.5rem);

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

                                        .time {
                                            color: var(--color-game-top-handicapper-list-game-time);
                                        }

                                        .amount {
                                            color: var(--color-game-top-handicapper-list-game-amount);
                                        }
                                    }
                                }
                            }

                            .game-footer {
                                display: flex;
                                justify-content: center;
                                padding: .2rem;
                                border-bottom-left-radius: .7rem;
                                border-bottom-right-radius: .7rem;
                                min-height: 2.2rem;
                                color: var(--color-game-top-handicapper-footer-color);
                                background-color: var(--color-game-top-handicapper-footer-bg);
                            }
                        }
                    }
                }
            }

            .title-picks {
                margin-top: 1.5rem;
                scroll-margin-top: 2rem;
            }

            .picks {
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                gap: 1rem;
                margin-top: 1.5rem;
        
                .pick {
                    display: flex;
                    flex-direction: column;
                    width: 23.5rem;
                    border-radius: .5rem;
                    background-color: var(--color-white);
                    padding-top: 1rem;
                    padding-bottom: 1rem;
                    border: 1px solid var(--color-game-top-handicapper-inner-border);
                    justify-content: space-between;
        
                    @media (max-width: 450px) {
                        & {
                            width: 100%;
                            min-width: initial;
                        }
                    }
        
                    .pick-header {
                        display: flex;
                        flex-direction: column;
        
                        .content {
                            width: 100%;
                            display: flex;
                            padding: .5rem;
                            justify-content: space-between;
        
                            .date-time {
                                display: flex;
                                justify-content: center;
                                text-align: center;
                            }
        
                            .status {
                                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: var(--color-white);
                                        border-radius: 50%;
                                        font-size: .9rem;
                                        background-color: var(--color-game-top-handicapper-list-game-amount);
                                    }
                                }
        
                                a {
                                    width: 100%;
                                }
                            }
                        }
                    }

                    .pick-link {
                        padding: .5rem;
                        display: flex;
                        justify-content: center;

                        .link {
                            width: 100%;
                            display: flex;
                            justify-content: center;
                            border-radius: .3rem;
                            padding: .5rem;
                            background-color: var(--color-game-top-handicapper-list-game-amount);

                            span {
                                text-align: center;
                                color: var(--color-white);
                                text-transform: uppercase;
                            }
                        }
                    }
                }
            }
        }
    }
}

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