$launcher-size: 70px;
$expanded-launcher-size: 275px;
$border-width: 4px;
$box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.39);
$background-color: #F1F1F1;

.widget-launcher-container {
    background-color: $background-color;
    box-sizing: border-box;
    display: flex;
    position: relative;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    max-width: 95vw;
    width: $launcher-size;
    height: $launcher-size;
    opacity: 0;
    border-radius: 50px;
    box-shadow: $box-shadow;
    transition: opacity .15s ease-in-out, width .3s ease-out, background-color ease-in-out .3s;
    margin-top: 20px;
    border: $border-width solid;

    // fixes safari flickering on transitions
    -webkit-transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;

    &.loaded {
        opacity: 1;
    }

    &:hover, &.expanded {
        width: 100%;

        .promo {
            visibility: visible;
        }
    }

    &.open {
        width: $launcher-size;
        opacity: 0;

        @include breakpoint(medium) {
            opacity: 1;
        }


        .close-icon {
            transform: scale(1);
        }

        .launcher-logo {
            opacity: 0;
        }
    }

    .launcher-logo {
        margin-left: 12px;
        z-index: 1;
        opacity: 1;
        height: 45px;
        transition: opacity .6s ease-in-out;
    }

    .close-icon {
        position: absolute;
        right: 0;
        left: 0;
        top: 0;
        bottom: 0;
        margin: auto;
    }

    .close-icon {
        z-index: 2;
        color: #fff;
        transform: scale(0); // hidden
        transition: transform .2s ease-in-out .4s;
    }

    .promo {
        display: flex;
        flex-direction: column;
        height: 100%;
        width: 100%;
        margin-left: 12px;
        margin-right: 35px;
        justify-content: center;
        align-items: flex-start;

        img {
            height: 70%;
        }

        .rich-text {
            align-self: flex-start;
        }
    }

    .rich-text {
        white-space: nowrap;
        line-height: 1.3rem;
        letter-spacing: 0;

        p {
            margin: 0;
        }

        .pretitle {
            font-weight: 700;
        }

        .title {
            font-size: 18px;
            font-weight: 800;
            text-transform: uppercase;
        }
    }
}
