@forward 'variables';
@use 'variables' as settings;

.smartappbanner {
    display: flex;
    justify-content: space-evenly;
    align-items: center;

    // clipping is better than tiny scrollbars
    overflow: hidden;
    width: 100%;
    height: 80px;
    background-color: settings.$background-color;
    font-family: settings.$font;
    color: settings.$font-color;

    // all buttons have a simple transition on them
    a {
        -webkit-transition: filter 300ms cubic-bezier(0.12, 0.57, 0.63, 0.21);
        -moz-transition: filter 300ms cubic-bezier(0.12, 0.57, 0.63, 0.21);
        -ms-transition: filter 300ms cubic-bezier(0.12, 0.57, 0.63, 0.21);
        transition: filter 300ms cubic-bezier(0.12, 0.57, 0.63, 0.21);

        &:hover,
        &:focus {
            filter: brightness(0.6);
        }
    }

    &__close {
        display: flex;
        justify-content: center;

        // no one likes hard to click buttons - especially dismiss x's
        // use padding to make the region (larger and) easier to click
        $paddingWidth: 6px;
        width: calc(settings.$close-size + $paddingWidth);
        height: calc(settings.$close-size + $paddingWidth);
        padding: $paddingWidth;

        a {
            position: relative;
            // this is a bit hacky to center the button but it works
            left: -1px;
            top: -3px;

            &:before,
            &:after {
                position: absolute;
                content: ' ';
                height: settings.$close-size;
                width: 2px;
                background-color: settings.$close-button-color;
            }

            &:before {
                transform: rotate(45deg);
            }

            &:after {
                transform: rotate(-45deg);
            }
        }
    }

    &__app-icon {
        display: block;
        background-size: settings.$icon-size settings.$icon-size;
        width: settings.$icon-size;
        height: settings.$icon-size;
    }

    &__description {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;

        // match the height of the icon to align the info with it
        height: settings.$icon-size;
        color: settings.$font-color;

        &__title {
            font-size: 14px;
        }

        &__author,
        &__price {
            font-size: 12px;
        }
    }

    &__view {
        padding: 0 10px;
        min-width: 10%;
        border-radius: 5px;
        color: settings.$view-button-color;
        font-size: 18px;
        text-align: center;
        text-decoration: none;

        &__label {
            text-align: center;
        }
    }
}
