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

@property --color-admin-cappers-capper-bg {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-admin-cappers-capper-header-border {syntax: "<color>";inherits: true;initial-value: #F1F1F1}
@property --color-admin-cappers-capper-team-vs {syntax: "<color>";inherits: true;initial-value: #111111}
@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;}
@property --color-admin-cappers-capper-footer {syntax: "<color>";inherits: true;initial-value: #FFFFFF}
@property --color-admin-cappers-capper-footer-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-admin-cappers-capper-footer-footer-link {syntax: "<color>";inherits: true;initial-value: #FFFFFF}
@property --color-admin-cappers-capper-footer-footer-link-hover {syntax: "<color>";inherits: true;initial-value: #3a96e0}
@property --color-admin-cappers-buttons-link {syntax: "<color>";inherits: true;initial-value: #FFFFFF}
@property --color-admin-cappers-block-preview-pick-title {syntax: "<color>";inherits: true;initial-value: #3a96e0}
@property --color-admin-cappers-block-preview-pick-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}

.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: var(--color-admin-cappers-capper-bg);

            @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-admin-cappers-capper-header-border);
    
                    @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;
                            color: var(--color-admin-cappers-capper-title);
    
                            @media (max-width: 400px) {
                                & {
                                    width: 100%;
                                    text-align: center;
                                }
                            }
                        }
                        
                        .sub-title {
                            color: var(--color-admin-cappers-capper-sub-title);
                        }
    
                        .total {
                            color: var(--color-admin-cappers-capper-total);
    
                            .picks {
                                color: var(--color-admin-cappers-capper-picks);
                            }
                        }
                    }
                }
    
                .capper-content {
                    display: flex;
                    padding-top: .5rem;
                    flex-direction: column;

                    .content-description {
                        padding-bottom: .5rem;
                        border-bottom: 1px solid var(--color-admin-cappers-capper-header-border);
                    }

                    .teams {
                        .team {
                            padding-bottom: .5rem;
                            border-bottom: 1px solid var(--color-admin-cappers-capper-header-border);

                            &: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%;
        
                                    @media (max-width: 350px) {
                                        & {
                                            width: 100%;
                                            text-align: center;
                                        }
                                    }
                                }
            
                                .date {
                                    width: 50%;
                                    text-align: center;
        
                                    @media (max-width: 350px) {
                                        & {
                                            width: 100%;
                                        }
                                    }
                                }
            
                                .status {
                                    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-admin-cappers-capper-team-vs);
                                }
            
                                .team-visitor {
                                    text-align: center;
                                }
                            }
            
                            .content-release {
                                display: flex;
                                justify-content: center;
                                padding-top: .3rem;
            
                                .release-date {
                                    text-align: center;
                                }
                            }
                        }
                    }
                }
            }

            .capper-footer {
                width: 100%;
                display: flex;
                color: var(--color-admin-cappers-capper-footer);
                padding: .3rem .6rem .4rem .6rem;
                border-bottom-left-radius: .8rem;
                border-bottom-right-radius: .8rem;
                background-color: var(--color-admin-cappers-capper-footer-bg);

                .footer-link {
                    width: 50%;

                    a {                        
                        color: var(--color-admin-cappers-capper-footer-footer-link);

                        &:hover {
                            color: var(--color-admin-cappers-capper-footer-footer-link-hover);
                        }
                    }
                }

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

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

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

        @include buttons-links;
    }
}

.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: var(--color-admin-cappers-block-preview-pick-title);
                        background-color: var(--color-admin-cappers-block-preview-pick-bg);
                    }
                }

                .pick-body {
                    .teams {
                        .team-vs {
                            .vs-logo {
                                span {
                                    background-color: var(--color-admin-cappers-block-preview-pick-bg);
                                }
                            }

                            .vs-name {
                                background-color: var(--color-admin-cappers-block-preview-pick-bg);
                            }
                        }
                    }
                }
            }
        }

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