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

.rdg-blocks .rdg-buttons-column {
    width: 100%;
    .preview-thumbs {
        background-image: url('../images/rdg-buttons-column-template-preview.jpg');
    }
    .content {
        width: 100%;
        display: flex;
        flex-direction: column;

        @include title;

        .buttons {
            display: flex;
            flex-direction: column;
            gap: .6rem;

            .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;

                        .image {
                            display: flex;
                            justify-content: start;
                            align-items: center;
                            max-width: 4rem;
                            margin-right: .5rem;
                        }

                        .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;

                    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);
                    }

                    a {
                        display: flex;
                        width: 100%;
                        color: var(--text-color);
                        padding-left: var(--button-padding);
                        padding-right: var(--button-padding);
                        justify-content: center;
                        
                        span {
                            text-align: center;
                        }
                    }

                    @include color-buttons;
                }
            }

            &.column .image-type {
                .body {
                    @media (max-width: 1000px) {
                        & {
                            flex-direction: column;

                            .image {
                                width: 100%;
                                max-width: initial;
                                justify-content: center;
                                margin-right: 0;
                                margin-bottom: .5rem;
                            }
                        }
                    }

                    @media (max-width: $breakpoint-md) {
                        & {
                            flex-direction: row;

                            .image {
                                width: 100%;
                                max-width: 4rem;
                                margin-right: .5rem;
                                margin-bottom: 0;
                            }
                        }
                    }

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

                            .image {
                                width: 100%;
                                max-width: initial;
                                margin-right: 0;
                            }
                        }
                    }
                }
            }

            &.full .image-type {
                .body {
                    @media (max-width: 360px) {
                        & {
                            flex-direction: column;

                            .image {
                                width: 100%;
                                max-width: initial;
                                margin-right: 0;
                                justify-content: center;
                            }
                        }
                    }
                }
            }
        }

        .info {
            background-color: var(--color-primary) !important;
            border-top: 2px solid var(--color-primary-dark-light) !important;

            &:hover {
                background-color: var(--color-primary-dark) !important;
            }
        }

        .success {
            background-color: var(--color-success) !important;
            border-top: 2px solid var(--color-success-light) !important;

            &:hover {
                background-color: var(--color-success-dark) !important;
            }
        }

        .warning {
            background-color: var(--color-warning) !important;
            border-top: 2px solid var(--color-warning-light) !important;

            &:hover {
                background-color: var(--color-warning-dark) !important;
            }
        }

        .danger {
            background-color: var(--color-danger) !important;
            border-top: 2px solid var(--color-danger-light) !important;

            &:hover {
                background-color: var(--color-danger-dark) !important;
            }
        }

        @include message;
    }
}

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

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