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

.rdg-blocks .rdg-admin-cappers {
    width: 100%;

    @include title;
    
    .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: $color-white;

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

            .content {
                padding: 1rem;

                .capper-header {
                    display: flex;
                    padding-bottom: .5rem;
                    border-bottom: 1px solid var(--color-gray);
    
                    @media (max-width: 400px) {
                        & {
                            flex-direction: column;
                        }
                    }
    
                    .header-avatar {
                        width: 18%;
                        display: flex;
                        min-width: 4.2rem;
                        align-items: center;
                        justify-content: flex-start;
    
                        @media (max-width: 400px) {
                            & {
                                width: 100%;
                                justify-content: center;
                                padding-bottom: .8rem;
                            }
                        }
                        
                        img {
                            max-width: 60px;
                            max-height: 60px;
    
                            @media (max-width: 400px) {
                                & {
                                    max-width: 80px;
                                    max-height: 80px;
                                }
                            }
                        }
                    }
    
                    .header-content {
                        width: 82%;
                        display: flex;
                        flex-direction: column;
    
                        @media (max-width: 400px) {
                            & {
                                width: 100%;
                                text-align: center;
                            }
                        }
    
                        .title {
                            display: initial;
                            text-align: left;
                            font-weight: 700;
                            line-height: 1.1rem;
                            color: var(--color-admin-cappers-capper-title);
    
                            @media (max-width: 400px) {
                                & {
                                    width: 100%;
                                    text-align: center;
                                }
                            }
                        }
                        
                        .sub-title {
                            font-size: .8rem;
                            font-weight: 700;
                            line-height: 1.1rem;
                            color: var(--color-admin-cappers-capper-sub-title);
                        }
    
                        .total {
                            font-size: .7rem;
                            font-weight: 700;
                            line-height: 1.1rem;
                            color: var(--color-admin-cappers-capper-total);
    
                            .picks {
                                font-size: .7rem;
                                font-weight: 700;
                                line-height: 1.1rem;
                                color: var(--color-admin-cappers-capper-picks);
                            }
                        }
                    }
                }
    
                .capper-content {
                    display: flex;
                    padding-top: .5rem;
                    flex-direction: column;

                    .content-description {
                        font-size: .9rem;
                        font-weight: 600;
                        line-height: 1.2rem;
                        padding-bottom: .5rem;
                        border-bottom: 1px solid var(--color-gray);

                        a {
                            text-decoration: none;
                        }
                    }

                    .teams {
                        .team {
                            padding-bottom: .5rem;
                            border-bottom: 1px solid var(--color-gray);

                            &:last-of-type {
                                padding-bottom: 0;
                                border-bottom: none;
                            }

                            .content-category {
                                width: 100%;
                                display: flex;
                                padding-top: .5rem;
        
                                @media (max-width: 350px) {
                                    & {
                                        flex-direction: column;
                                    }
                                }
            
                                .category {
                                    width: 25%;
                                    text-transform: uppercase;
        
                                    @media (max-width: 350px) {
                                        & {
                                            width: 100%;
                                            text-align: center;
                                        }
                                    }
                                    
                                    span {
                                        font-weight: 700;
                                        font-size: .9rem;
                                    }
                                }
            
                                .date {
                                    width: 50%;
                                    text-align: center;
        
                                    @media (max-width: 350px) {
                                        & {
                                            width: 100%;
                                        }
                                    }
            
                                    span {
                                        font-size: .9rem;
                                        font-weight: 500;
                                    }
                                }
            
                                .status {
                                    width: 25%;
                                    text-align: right;
                                    text-transform: uppercase;
        
                                    @media (max-width: 350px) {
                                        & {
                                            width: 100%;
                                            text-align: center;
                                        }
                                    }
                                    
                                    span {
                                        font-weight: 700;
                                        font-size: .9rem;
                                    }
                                }
                            }
            
                            .content-teams {
                                width: 100%;
                                display: flex;
                                font-weight: 700;
                                font-size: .9rem;
                                padding-top: .3rem;
                                flex-direction: row;
                                justify-content: center;
                                text-transform: uppercase;
                                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-release {
                                display: flex;
                                justify-content: center;
                                padding-top: .3rem;
            
                                .release-date {
                                    text-align: center;
                                    font-size: .9rem;
                                    font-weight: 500;
                                }
                            }
                        }
                    }
                }
            }

            .capper-footer {
                width: 100%;
                display: flex;
                font-size: 1rem;
                font-weight: 600;
                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 {
                        text-decoration: none;
                        color: var(--color-white);

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

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

    .buttons {
        padding-top: 1rem;
        display: flex;
        justify-content: center;
        gap: 1rem;

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

        a {
            margin-top: 1rem;
            padding: .8rem 1.5rem;
            font-size: 1rem;
            font-weight: 500;
            color: var(--color-white);
            border-radius: .4rem;
            min-width: 10rem;
            text-align: center;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: .2s background-color ease-in-out, .2s color ease-in-out, .2s border-color ease-in-out, .2s opacity ease-in-out, .2s box-shadow ease-in-out;
            
            &.link-success {
                background-color: var(--color-success);
                border-top: 3px solid var(--color-success-light);
            }

            &.link-warning {
                background-color: var(--color-warning);
                border-top: 3px solid var(--color-warning-light);
            }

            &.link-danger {
                background-color: var(--color-danger);
                border-top: 3px solid var(--color-danger-light);
            }

            &.link-default {
                color: var(--color-primary);
                background-color: var(--color-gray);
                border: 2px solid var(--color-primary);
            }

            &:last-of-type {
                @media (max-width: 350px) {
                    & {
                        margin-top: 0;
                    }
                }
            }
        }
    }
}

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

        .picks {
            .pick {
                .pick-header {
                    .title {
                        border-color: $color-primary;
                        background-color: $color-primary-dark-light;
                    }
                }

                .pick-body {
                    .teams {
                        .team-vs {
                            .vs-logo {
                                span {
                                    background-color: $color-primary-dark-light;
                                }
                            }

                            .vs-name {
                                background-color: $color-primary-dark-light;
                            }
                        }
                    }
                }
            }
        }

        .buttons {
            a {
                text-decoration: none;
            }
        }
    }
}
