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

@property --color-favorite-cappers-title {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-favorite-cappers-sub-title {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-favorite-cappers-total {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-favorite-cappers-picks {syntax: "<color>";inherits: true;initial-value: #00bc00;}
@property --color-favorite-cappers-picks-available {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-favorite-cappers-picks-available-text {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-favorite-cappers-gray {syntax: "<color>";inherits: true;initial-value: #F1F1F1;}
@property --color-favorite-cappers-white {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-favorite-cappers-footer-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;} 
@property --color-favorite-cappers-footer-link-hover {syntax: "<color>";inherits: true;initial-value: #3a96e0;}


.rdg-blocks .rdg-favorite-cappers {
    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;

        .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-favorite-cappers-white);
    
                @media (max-width: 450px) {
                    & {
                        width: 100%;
                        min-width: initial;
                    }
                }
    
                .content {

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

                    .capper-description {
                        text-align: justify;
                        padding: .5rem 1rem;
                        border-bottom: 1px solid var(--color-favorite-cappers-gray);

                    }
    
                    .picks-available {
                        display: flex;
                        justify-content: center;
                        padding: .5rem 1rem 1rem 1rem;
                        
                        span {
                            margin-top: 1rem;
                            padding: .5rem 1.8rem;
                            border-radius: .5rem;
                            color: var(--color-favorite-cappers-picks-available-text);
                            background-color: var(--color-favorite-cappers-picks-available);
                        }
                    }
                }
    
                .capper-footer {
                    width: 100%;
                    display: flex;
                    color: var(--color-favorite-cappers-white);
                    padding: .3rem .6rem .4rem .6rem;
                    border-bottom-left-radius: .8rem;
                    border-bottom-right-radius: .8rem;
                    background-color: var(--color-favorite-cappers-footer-bg);
                    justify-content: center;
    
                    a {
                        color: var(--color-favorite-cappers-white);

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

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