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

@property --color-rdg-promote-site-bg {syntax: "<color>";inherits: true;initial-value: #f0f0f0}
@property --color-rdg-promote-site-header {syntax: "<color>";inherits: true;initial-value: #ffffff}
@property --color-rdg-promote-site-header-border {syntax: "<color>";inherits: true;initial-value: #3a96e0}
@property --color-rdg-promote-site-primary {syntax: "<color>";inherits: true;initial-value: #0160ac}
@property --color-rdg-promote-site-body-bg {syntax: "<color>";inherits: true;initial-value: #f0f0f0}
@property --color-rdg-promote-site-button-success {syntax: "<color>";inherits: true;initial-value: #00bc00}
@property --color-rdg-promote-site-button-success-border {syntax: "<color>";inherits: true;initial-value: #68f96e}
@property --color-rdg-promote-site-gray-light {syntax: "<color>";inherits: true;initial-value: #d8d8d8}
@property --color-rdg-promote-site-gray {syntax: "<color>";inherits: true;initial-value: #4a4a4a}
@property --color-rdg-promote-site-gray-dark {syntax: "<color>";inherits: true;initial-value: #b2b2be}
@property --color-rdg-promote-site-black {syntax: "<color>";inherits: true;initial-value: #000000}
@property --color-rdg-promote-site-red {syntax: "<color>";inherits: true;initial-value: #ff0000}
@property --color-rdg-promote-site-button {syntax: "<color>";inherits: true;initial-value: #ffffff}

.rdg-blocks .rdg-blocks-promote {
    .preview-thumbs {
        background-image: url('../images/rdg-promote-site-template-preview.jpg');
    }

    width: 100%;
    background-color: var(--color-rdg-promote-site-bg);
    border-radius: 1rem;

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        border-bottom: .3rem solid var(--color-rdg-promote-site-header-border);
        background-color: var(--color-rdg-promote-site-primary);
        padding: 10px;
        color: var(--color-rdg-promote-site-header);

        .promote-left {
            display: flex;
            align-items: center;

            .promote-logo {
                max-width: 192px;
                height: 50px;
                object-fit: contain;
            }
        }

        .promote-name {
            margin-left: 10px;
        }

        .promote-right {
            margin-left: auto;
        }

        .promote-offer-amount {
            padding: 5px 15px;
            border-radius: 4px; 
        }
    }

    .body {
        background-color: var(--color-rdg-promote-site-body-bg);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1rem 0px 1rem;

        .promote-content {
            display: flex;
            width: 100%;
            align-items: center;

            .promote-offer-description {
                margin-right: 2rem;
                width: 60%;
                margin: 0 auto;

                &::first-line {
                    color: var(--color-rdg-promote-site-primary);
                }
            }
        }

        .promote-action-button {
            text-align: right;

            a {
                color: var(--color-rdg-promote-site-button);
                display: inline-block;
                padding: 10px;
                background-color: var(--color-rdg-promote-site-button-success);
                border: 2px solid var(--color-rdg-promote-site-button-success);
                border-top: 2px solid var(--color-rdg-promote-site-button-success-border);
                border-radius: 0.6rem;
                margin-right: auto;
                align-items: end;
                text-decoration: none;
                text-transform: uppercase;
            }
        }
    }

    .promote-features {
        list-style: none;
        background-color: var(--color-rdg-promote-site-gray-light);
        margin: 6px 0;
        padding: 0 20px;

        ul {
            padding: 0;
            list-style: none;
        }

        li {
            color: var(--color-rdg-promote-site-gray);
            position: relative;
            padding-left: 30px;
            line-height: 2rem;

            &:before {
                content: '';
                display: inline-block;
                background-image: url('../images/check-mark.svg');
                background-size: cover;
                width: 24px;
                height: 24px;
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);                
            }
        }
    }

    .footer {
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom-left-radius: .5rem;
        border-bottom-right-radius: .5rem;
        padding-bottom: 8px;

        .terms-link {
            color: var(--color-rdg-promote-site-gray-dark);
            font-weight: 600;
            text-decoration: none;
        }
    }
}

@media (max-width: 1024px) {
    .rdg-blocks .rdg-blocks-promote .body .promote-content {
        flex-direction: column;
        align-items: center;
    }

    .rdg-blocks .rdg-blocks-promote .body .promote-content .promote-offer-description {
        width: 100%;
        margin-bottom: 20px;
        text-align: center;
    }

    .rdg-blocks .rdg-blocks-promote .body .promote-content  {
        width: 100%;
        display: flex;
        justify-content: center;

        .promote-action-button  {
            width: 100%;
            text-align: center;
        }
    }
}
