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

@property --color-sports-picks-vs-bg {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-sports-picks-vs-title-color {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-sports-picks-vs-title {syntax: "<color>";inherits: true;initial-value: #021c40;}
@property --color-sports-picks-vs-border {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-sports-picks-vs-team-vs-logo-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-sports-picks-vs-team-vs-logo {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-sports-picks-vs-separator-border {syntax: "<color>";inherits: true;initial-value: #CCC;}
@property --color-sports-picks-vs-available {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-sports-picks-vs-available-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-sports-picks-vs-footer {syntax: "<color>";inherits: true;initial-value: #021c40;}
@property --color-sports-picks-vs-footer-link {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-sports-picks-vs-footer-link-hover {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-sports-picks-vs-field-color {syntax: "<color>";inherits: true;initial-value: #475364;}

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

        .picks {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2rem;
    
            .pick {
                display: flex;
                flex-direction: column;
                width: 24rem;
                border-radius: .5rem;
                background-color: var(--color-sports-picks-vs-bg);
    
                @media (max-width: 450px) {
                    & {
                        width: 100%;
                        min-width: initial;
                    }
                }
    
                .pick-header {
                    display: flex;
                    flex-direction: column;

                    .title {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        min-height: 2.5rem;
                        border-top-left-radius: .5rem;
                        border-top-right-radius: .5rem;
                        border-bottom: 3px solid;
                        color: var(--color-sports-picks-vs-title-color);
                        padding: .3rem;
                        text-align: center;
                        background-color: var(--color-sports-picks-vs-title);
                        border-color: var(--color-sports-picks-vs-border);
                    }
                }
    
                .pick-body {
                    display: flex;
                    flex-direction: column;
                    padding: 0 .5rem;
    
                    .teams {
                        display: flex;
                        padding-top: .5rem;
    
                        .team {
                            display: flex;
                            align-items: center;
                            justify-content: end;
                            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: 100px;
                                    max-height: 100px;
    
                                    @media (max-width: $breakpoint-sm) {
                                        & {
                                            max-width: 80px;
                                            max-height: 80px;
                                        }
                                    }
                                }
                            }
                        }
    
                        .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: 2rem;
                                    width: 2rem;
                                    color: var(--color-sports-picks-vs-team-vs-logo);
                                    border-radius: 50%;
                                    background-color: var(--color-sports-picks-vs-team-vs-logo-bg);
                                }
                            }
                        }
                    }
    
                    .fields {
                        display: flex;
                        flex-direction: column;
                        text-align: center;
                        margin-top: 1rem;
    
                        .separator {
                            border-top: 1px solid var(color-sports-picks-vs-separator-border);
                            min-height: 2rem;
                            padding: .4rem 0;
                            
                            &:last-of-type {
                                border-bottom: 1px solid var(color-sports-picks-vs-separator-border);
                            }
                        }

                        .field {
                            width: 100%;
                            display: flex;
                            gap: .5rem;
                            justify-content: space-between;
                            color: var(--color-sports-picks-vs-field-color);

                            .team-home {
                                width: 40%;
                                text-align: left;
                            }

                            .leyend {
                                width: 20%;
                            }

                            .team-visitor {
                                width: 40%;
                                text-align: right;
                            }
                        }
                    }

                    .picks-available {
                        display: flex;
                        justify-content: center;
                        margin-top: 1.5rem;
                        margin-bottom: 1.5rem;

                        span {
                            color: var(--color-sports-picks-vs-available);
                            border-radius: .3rem;
                            text-align: center;
                            padding: .5rem 1.3rem;
                            background-color: var(--color-sports-picks-vs-available-bg);
                        }
                    }
                }

                .pick-footer {
                    display: flex;
                    justify-content: center;
                    padding: .3rem;
                    background-color: var(--color-sports-picks-vs-footer);
                    border-bottom-left-radius: .5rem;
                    border-bottom-right-radius: .5rem;
                    min-height: 2.19rem;
    
                    @include link-style;
    
                    a {
                        color: var(--color-sports-picks-vs-footer-link);
    
                        &:hover {
                            color: var(--color-sports-picks-vs-footer-link-hover);
                        }
                    }
                }
            }
        }
    }
}

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