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

.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;
            flex-direction: column;
            padding: 20px;
            color: $color-white;
            text-align: center;

            h1, h2, h3, span {
                margin: 0;
                font-weight: 400;
                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 {
                .buttons {
                    padding-top: 1rem;
                    display: flex;
                    justify-content: center;
                    gap: 1rem;
            
                    @media (max-width: 350px) {
                        & {
                            flex-direction: column;
                        }
                    }
            
                    a {
                        margin-top: 1rem;
                        padding: .8rem 1.5rem;
                        font-size: 1rem;
                        font-weight: 500;
                        //margin-right: 1rem;
                        color: var(--color-white);
                        border-radius: .4rem;
                        min-width: 10rem;
                        text-align: center;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        transition: .2s background-color ease-in-out, .2s color ease-in-out, .2s border-color ease-in-out, .2s opacity ease-in-out, .2s box-shadow ease-in-out;
                        
                        &.link-success {
                            border-top: 3px solid var(--color-success-light);
                            background-color: var(--color-success);
                        }
            
                        &.link-warning {
                            border-top: 3px solid var(--color-warning-light);
                            background-color: var(--color-warning);
                        }
            
                        &.link-danger {
                            border-top: 3px solid var(--color-danger-light);
                            background-color: var(--color-danger);
                        }
            
                        &.link-default {
                            color: var(--color-primary);
                            border: 2px solid var(--color-primary);
                            background-color: var(--color-gray);
                        }
            
                        &:last-of-type {
                            @media (max-width: $breakpoint-sm) {
                                & {
                                    margin-top: 0;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

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

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