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

@property --color-best-pph-features-value {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-best-pph-site-h4 {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-best-pph-site-span {syntax: "<color>";inherits: true;initial-value: #111;}
@property --color-best-pph-description {syntax: "<color>";inherits: true;initial-value: #111;}

.rdg-blocks .rdg-best-pph {
    .preview-thumbs {
        background-image: url('../images/rdg-best-pph-template-preview.jpg');
    }

    width: calc(var(--vw, 1vw) * 100);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;

    .container.content {
        width: 100%;
        display: flex;
        gap: 0 2rem;
        flex-direction: column;
        padding: 0 20px;

        @include title;

        .items {
            display: flex;
            gap: 1.5rem;
            flex-wrap: wrap;
            justify-content: space-evenly;

            .item {
                width: 25rem;
                border-top-right-radius: 1rem;
                border-top-left-radius: 1rem;
                border-bottom-right-radius: .6rem;
                border-bottom-left-radius: .6rem;
                background-color: var(--element-color);

                @media (max-width: $breakpoint-sm) {
                    & {
                        width: 100%;
                    }
                }

                .header {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    padding: .8rem;
                    border-top-right-radius: .8rem;
                    border-top-left-radius: .8rem;
                    min-height: 5.3rem;
                    background-color: var(--header-color);

                    .logo {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        
                        img {
                            max-height: 3.2rem;
                        }
                    }
                }

                .features {
                    padding: 1.5rem 1rem;

                    @media (max-width: $breakpoint-sm) {
                        & {
                            padding: 1rem;
                        }
                    }

                    ul {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        margin: inherit;
                        background-position: left 4px;
                        
                        .center {
                            display: flex;
                            flex-direction: column;
                            gap: .2rem;
            
                            li {
                                display: flex;
                                flex-direction: row;
                                margin: inherit;
                                align-items: center;
                                padding-left: .8rem;
                                list-style-type: none;
                                padding-left: 0;
                
                                .icon {
                                    width: 1.2rem;
                                    height: 1.2rem;
                                    margin-right: .5rem;
                
                                    svg {
                                        fill: var(--list-color);
                                    }
                                }

                                .value {
                                    color: var(--color-best-pph-features-value);
                                }
                            }
                
                            li.check {
                                background-image: url('../images/check.svg');
                            }
                
                            li.circle {
                                background-image: url('../images/circle.svg');
                            }
                
                            li.dot {
                                background-image: url('../images/dot.svg');
                            }
                
                            li.chevron {
                                background-image: url('../images/chevron.svg');
                            }
                        }
                    }
                }

                .site {
                    display: flex;
                    flex-direction: column;
                    text-align: center;
                    padding: .5rem 0;
                    background-color: var(--site-color);

                    h4 {
                        margin-bottom: 0;
                        color: var(--color-best-pph-site-h4);
                    }

                    span {
                        color: var(--color-best-pph-site-span);
                    }
                }

                .description {
                    padding: 1rem;
                    text-align: justify;
                    color: var(--color-best-pph-description);

                    p {
                        margin-bottom: .8rem;

                        &:last-of-type {
                            margin-bottom: 0;
                        }
                    }
                }

                .buttons {
                    display: flex;
                    flex-direction: column;
                    gap: .6rem;
                    padding: 1rem;
        
                    .item-button {
                        display: flex;
                        flex-direction: column;
        
                        &.image-type {
                            .body {
                                width: 100%;
                                display: flex;
                                flex-direction: row;
                                padding-top: .5rem;
                                padding-bottom: .5rem;
                                padding-left: var(--body-padding);
                                padding-right: var(--body-padding);
                                background-color: var(--body-bg);
                                border-radius: .6rem;
                                justify-content: center;
                                align-items: center;

                                @media (max-width: 360px) {
                                    & {
                                        flex-direction: column;
                                    }
                                }
        
                                .image {
                                    display: flex;
                                    justify-content: start;
                                    align-items: center;
                                    max-width: 4rem;
                                    margin-right: .5rem;

                                    @media (max-width: 360px) {
                                        & {
                                            width: 100%;
                                            max-width: initial;
                                            margin-right: 0;
                                            justify-content: center;
                                        }
                                    }
                                }
        
                                .texts {
                                    display: flex;
                                    flex-direction: column;
                                    align-items: center;
        
                                    span {
                                        font-size: var(--text-size);
                                        font-weight: var(--text-weight);
                                        color: var(--text-color);
                                        padding-bottom: var(--text-padding);
                                        text-align: center;
                                    }
                                }
                            }
                        }
        
                        &.basic-type {
                            width: 100%;
                            padding-top: .5rem;
                            padding-bottom: .5rem;
                            padding-left: var(--button-padding);
                            padding-right: var(--button-padding);
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            border-radius: .6rem;
                            transition: all .2s;
                            font-size: var(--button-size);
                            font-weight: var(--button-weight);
        
                            color: var(--button-color);
                            border-top: 2px solid var(--button-border);
                            background-color: var(--button-bg);
        
                            &:hover {
                                background-color: var(--button-hover);
                            }
        
                            span {
                                text-align: center;
                            }
        
                            @include color-buttons;
                        }
                    }
                }
            }
        }

        @include message;
    }
}

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

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