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

@property --color-pros-cons-verified {syntax: "<color>";inherits: true;initial-value: #00bc00}
@property --color-pros-cons-date {syntax: "<color>";inherits: true;initial-value: #555}

.rdg-blocks .rdg-pros-cons {
    width: 100%;

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

        .heading-container {
            display: flex;
            justify-content: var(--justify);

            .center {
                display: flex;

                .border {
                    background-color: var(--border-color);
                    width: var(--border-size);
                    margin: 8px 10px 3px 0;
    
                    @media (max-width: $breakpoint-sm) {
                        & {
                            margin: 0 10px 0 0;
                        }
                    }
                }
    
                @include heading;
            }
        }

        @include message;
    }

    .review {
        .verified {
            display: flex;
            align-items: center;
            margin-bottom: .5rem;
            gap: .5rem;
            flex-wrap: wrap;

            @media (max-width: $breakpoint-sm) {
                & {
                    justify-content: center;
                    margin-bottom: 1rem;
                }
            }

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

            .label {
                color: var(--color-pros-cons-verified);
            }

            .date {
                color: var(--color-pros-cons-date);
            }
        }

        .review-body {
            display: flex;
            gap: 1rem 1.5rem;

            @media (max-width: $breakpoint-sm) {
                & {
                    flex-direction: column;
                }
            }

            .image {
                width: 60%;

                @media (max-width: $breakpoint-md) {
                    & {
                        width: 50%;
                    }
                }

                @media (max-width: $breakpoint-sm) {
                    & {
                        width: 100%;
                    }
                }
                
                img {
                    border-radius: 1rem;
                }
            }

            .pros-cons {
                width: auto;
                display: flex;
                flex-direction: column;

                @media (max-width: $breakpoint-md) {
                    & {
                        width: 50%;
                    }
                }

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

                .group {
                    padding-bottom: 1rem;

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

                    .heading {
                        display: block;
                    }

                    ul {
                        display: flex;
                        flex-direction: column;
                        margin: inherit;
                        background-position: left 4px;
            
                        li {
                            display: flex;
                            flex-direction: row;
                            margin: inherit;
                            align-items: center;
                            padding-left: .8rem;
                            list-style-type: none;

                            &.check {
                                background-image: url('../images/check.svg');
                            }
                
                            &.circle {
                                background-image: url('../images/circle.svg');
                            }
                
                            &.dot {
                                background-image: url('../images/dot.svg');
                            }
                
                            &.chevron {
                                background-image: url('../images/chevron.svg');
                            }

                            &.close {
                                background-image: url('../images/close.svg');
                            }
            
                            @media (max-width: $breakpoint-sm) {
                                & {
                                    padding-left: 0;
                                }
                            }
            
                            .icon {
                                width: 1.2rem;
                                height: 1.2rem;
                                margin-right: .5rem;
            
                                svg {
                                    fill: var(--list-color);
                                }
                            }

                            .value {
                                margin-bottom: 0;
                                font-size: var(--item-size);
                                line-height: var(--item-size);
                                font-weight: var(--item-weight);
                            }
                        }
                    }
                }
            }
        }
    }
}

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