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

@property --color-rdg-secondary-banner-bg {syntax: "<color>";inherits: true;initial-value: #F1F1F1;}
@property --color-rdg-secondary-banner-left-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-rdg-secondary-banner-left {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-rdg-secondary-banner-right-link {syntax: "<color>";inherits: true;initial-value: #FFFFFF;}
@property --color-rdg-secondary-banner-right-link-bg {syntax: "<color>";inherits: true;initial-value: #00bc00;}
@property --color-rdg-secondary-banner-right-link-bg-hover {syntax: "<color>";inherits: true;initial-value: #68f96e;}
@property --color-rdg-secondary-banner-right-link-border-top {syntax: "<color>";inherits: true;initial-value: #244d0e;}

.rdg-blocks .rdg-secondary-banner {
    .preview-thumbs {
        background-image: url('../images/rdg-secundary-banner-template-preview.jpg');
    }
    padding: 20px 0;

    .secondary-banner-container {
        display: flex;
        width: 100%;
        height: 125px;
        background-color: var(--color-rdg-secondary-banner-bg);
        background-size: contain;
        border-radius: 0.8rem;

        @media screen and (max-width: $breakpoint-sm) {
            flex-direction: column;
            height: auto;
        }
    }

    .left {
        position: relative;
        flex-basis: 48%;
        height: 100%;
        background-color: var(--color-rdg-secondary-banner-left-bg);
        clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
        display: flex;
        justify-content: center;
        align-items: center;
        border-top-left-radius: 0.8rem;
        border-bottom-left-radius: 0.8rem;
        color: var(--color-rdg-secondary-banner-left);

        @media screen and (max-width: $breakpoint-sm) {
            padding: 20px;
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
            text-align: center;
            border-top-left-radius: 0.8rem;
            border-top-right-radius: 0.8rem;
            border-bottom-left-radius: 0;
        }
    }


    .right {
        position: relative;
        flex-basis: 52%;
        height: 100%;
        background-color: var(--color-rdg-secondary-banner-bg);
        border-top-right-radius: 0.8rem;
        border-bottom-right-radius: 0.8rem;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 0 50px;
        background-position: left 15% center;
        background-repeat: no-repeat;

        img {
            margin-right: 20px;
        }

        @media screen and (max-width: $breakpoint-sm) {
            min-height: auto;
            justify-content: center;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0.8rem;
            border-bottom-left-radius: 0.8rem;
            padding: 50px;

            flex-direction: column;
            img {
                margin-right: 0;
                margin-bottom: 20px;
            }
        }

        a {
            color: var(--color-rdg-secondary-banner-right-link);
            background-color: var(--color-rdg-secondary-banner-right-link-bg);
            border-radius: 0.3rem;
            padding: 12px 40px; 
            border-top: 2px solid var(--color-rdg-secondary-banner-right-link-bg-hover);
            transition: 0.3s ease-in;

            &:hover {
                background-color: var(--color-rdg-secondary-banner-right-link-border-top);
            }

            @media screen and (max-width: $breakpoint-md) {
                text-align: center;
                padding: 10px;
                margin-left: 0;
            }
        }
    }

    .hide-on-mobile {
        display: none;
    }
    
    @media (min-width: 768px) {
        .hide-on-mobile {
            display: block;
        }
    }    
}
