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

@property --color-rdg-call-to-action-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-rdg-call-to-action-white {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}

.rdg-blocks .rdg-call-to-action {
    width: calc(var(--vw, 1vw) * 100);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 99.55vw;

    .body {
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center center;
        background-image: var(--background-image);
        background-color: var(--color-rdg-call-to-action-bg);

        .container.content {
            width: 100%;
            display: flex;
            color: var(--color-rdg-call-to-action-white);
            text-align: center;
            justify-content: center;
            gap: 0 2rem;

            &.vertical {
                padding: 1.5rem 20px;
                flex-direction: column;
            }

            &.horizontal {
                padding: 2.5rem 20px;
                flex-direction: row;

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

            .texts {
                display: flex;
                flex-direction: column;

                h1, h2, h3, span {
                    margin: 0;
                    font-size: var(--font-size);
                    line-height: var(--line-height);
            
                    @media (max-width: $breakpoint-lg) {
                        & {
                            font-size: var(--font-size-lg);
                            line-height: var(--line-height-lg);
                        }
                    }
            
                    @media (max-width: $breakpoint-md) {
                        & {
                            font-size: var(--font-size-md);
                            line-height: var(--line-height-md);
                        }
                    }
            
                    @media (max-width: $breakpoint-sm) {
                        & {
                            font-size: var(--font-size-sm);
                            line-height: var(--line-height-sm);
                        }
                    }
                }
            }

            .footer {
                &.horizontal {
                    display: flex;
                    align-items: center;

                    @media (max-width: $breakpoint-sm) {
                        & {
                            align-items: inherit;
                            justify-content: center;
                        }
                    }
                }

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

                    &.vertical {
                        padding-top: 1rem;

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

                        a {
                            margin-top: 1rem;
                        }
                    }

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

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

                        a {
                            margin-top: 1rem;
                        }
                    }
            
                    @include buttons-links;
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-call-to-action {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
