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

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

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

        @include title;
        
        .content {
            width: 100%;
            display: flex;

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

            .image {
                display: flex;
                align-items: flex-start;

                &.w-40 {
                    width: 40%;
                    padding-right: 2rem;
                    justify-content: end;
                }

                &.w-100 {
                    width: 100%;
                    justify-content: center;
                }

                @media (max-width: $breakpoint-md) {
                    & {
                        &.w-40 {
                            width: 100%;
                            padding-right: 0;
                            padding-bottom: 2rem;
                            justify-content: center;
                        }
                    }
                }

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

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

            .items {
                &.w-60 {
                    width: 60%;
                }

                &.w-100 {
                    width: 100%;
                }

                @media (max-width: $breakpoint-md) {
                    & {
                        &.w-60 {
                            width: 100%;
                        }
                    }
                }

                .item {
                    padding-bottom: 1.5rem;

                    .item-title {
                        width: 100%;
                        padding-bottom: 1rem;
                        display: inline-block;
                        color: var(--color-image-column-item-title);
                    }

                    .item-text {
                        text-align: justify;
                        color: $color-dark-gray;
                        margin-bottom: 0;
                        color: var(--color-image-column-item-text);
                    }
                }
            }
        }

        .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;
                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 {
                    background-color: var(--color-success);
                    border-top: 3px solid var(--color-success-light);
                }
    
                &.link-warning {
                    background-color: var(--color-warning);
                    border-top: 3px solid var(--color-warning-light);
                }
    
                &.link-danger {
                    background-color: var(--color-danger);
                    border-top: 3px solid var(--color-danger-light);
                }
    
                &.link-default {
                    color: var(--color-primary);
                    background-color: var(--color-gray);
                    border: 2px solid var(--color-primary);
                }
    
                &:last-of-type {
                    @media (max-width: 350px) {
                        & {
                            margin-top: 0;
                        }
                    }
                }
            }
        }
    }
}

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

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