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

// Variables
@property --color-admin-cappers-capper-title {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-admin-cappers-capper-sub-title {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-admin-cappers-capper-total {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-admin-cappers-capper-picks {syntax: "<color>";inherits: true;initial-value: #00bc00;}
@property --color-admin-cappers-capper-teams {syntax: "<color>";inherits: true;initial-value: #0160ac;}



.rdg-blocks .rdg-admin-cappers-simple {
    .preview-thumbs {
        background-image: url('../images/rdg-admin-cappers-simple-template-preview.jpg');
    }
    
    &.full {
        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;
        }
    }
    
    .container.content {
        width: 100%;
        display: flex;
        flex-direction: column;

        @include title;

        .title {
            h1, h2, h3, span {
                padding-left: .7rem !important;
            }
        }
    
        .cappers {
            gap: 1.2rem;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            
            .capper {
                display: flex;
                width: 25rem;
                height: fit-content;
                border-radius: .8rem;
                flex-direction: column;
                background-color: var(--color-white);
                flex-wrap: wrap;
                height: auto;

                @media (max-width: 450px) {
                    & {
                        width: 100%;
                        min-width: initial;
                    }
                }

                .content {
                    padding: 1rem;

                    .capper-content {
                        display: flex;
                        flex-direction: column;
        
                        .content-category {
                            width: 100%;
                            display: flex;

                            @media (max-width: 350px) {
                                & {
                                    flex-direction: column;
                                }
                            }
        
                            .category {
                                width: 25%;

                                @media (max-width: 350px) {
                                    & {
                                        width: 100%;
                                        text-align: center;
                                    }
                                }

                                &.api {
                                    width: 100%;
                                }
                            }
        
                            .date {
                                width: 50%;
                                text-align: center;

                                @media (max-width: 350px) {
                                    & {
                                        width: 100%;
                                    }
                                }
                            }
        
                            .handicap {
                                width: 25%;
                                text-align: right;

                                @media (max-width: 350px) {
                                    & {
                                        width: 100%;
                                        text-align: center;
                                    }
                                }
                            }
                        }
        
                        .content-teams {
                            width: 100%;
                            display: flex;
                            padding-top: .3rem;
                            flex-direction: row;
                            justify-content: center;
                            color: var(--color-admin-cappers-capper-teams);
                            
                            .team-home {
                                text-align: center;
                            }
                            
                            .team-vs {
                                margin: 0 .3rem;
                                color: var(--color-black);
                            }
        
                            .team-visitor {
                                text-align: center;
                            }
                        }

                        .content-teams-logo {
                            width: 100%;
                            display: flex;
                            padding-top: .3rem;
                            flex-direction: row;
                            justify-content: center;
                            color: var(--color-admin-cappers-capper-teams);
                            
                            .teams {
                                width: 100%;
                                display: flex;
                                align-items: center;
            
                                .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: 90px;
                                            max-height: 90px;
            
                                            @media (max-width: 450px) {
                                                & {
                                                    max-width: 70px;
                                                    max-height: 70px;
                                                }
                                            }
                                        }
                                    }
            
                                    .team-name {
                                        padding: .3rem;
                                        text-align: 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;
                                            color: var(--color-white);
                                            border-radius: 50%;
                                            background-color: var(--color-admin-cappers-capper-teams);
                                        }
                                    }
            
                                    .vs-name {
                                        width: 100%;
                                        display: flex;
                                        justify-content: center;
                                        border-radius: .3rem;
                                        padding: .4rem;
                                        background-color: var(--color-admin-cappers-capper-teams);
            
                                        span {
                                            text-align: center;
                                            color: var(--color-white);
                                        }
                                    }
                                }
                            }
                        }
        
                        .content-release {
                            padding-top: .3rem;

                            hr {
                                width: 100%;
                                margin: 1rem 0;
                                padding: 0;
                                border-bottom: 1px solid var(--color-gray-line);
                            }
        
                            .release-date {
                                display: flex;
                                justify-content: center;
                                text-align: center;
                                
                                span {
                                    padding-left: .5rem;
                                }
                            }
                        }
                    }
                }
                
                .capper-footer {
                    width: 100%;
                    display: flex;
                    color: var(--color-white);
                    padding: .3rem .6rem .4rem .6rem;
                    border-bottom-left-radius: .8rem;
                    border-bottom-right-radius: .8rem;
                    background-color: var(--color-primary-dark-light);

                    .footer-link {
                        width: 50%;

                        a {
                            color: var(--color-white);

                            &:hover {
                                color: var(--color-primary);
                            }
                        }
                    }

                    .footer-status {
                        width: 50%;
                        display: flex;
                        justify-content: end;
                    }
                }
            }

            .message {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 1.5rem;
                border-radius: .5rem;
                background-color: var(--rdg-picks-vs-message-bg);
                border: 1px solid var(--rdg-picks-vs-message-border);

                span {
                    text-align: center;
                    color: var(--rdg-picks-vs-message);
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-admin-cappers-simple {
        &.full {
            width: 100%;
            position: initial;
            left: initial;
            right: initial;
            margin-left: initial;
            margin-right: initial;
            max-width: initial;
        }
    }
}
