#survey {
    position: fixed;
    top: calc(50% - 175px);
    left: 0;
    pointer-events: none;
    z-index: 999;
}


#surveyBar {
    display: inline-block;
    position: relative;
    background: #F2F2F2;
    box-sizing: border-box;
    box-shadow: 0 3px 20px rgba(0,0,0,.5);
    box-sizing: border-box;
    max-width: 320px;
    left: 0px;
    top: 50%;
    animation: moveInLeft 1s ease-in-out;
    animation-fill-mode: forwards;
    pointer-events: all;
    border-radius: 5px;
    transition: all 500ms;
}
#surveyBar:hover {
    box-shadow: 0 0px 20px rgba(255, 230, 0, 0.5), 0 0 10px rgba(235, 180, 0, 1);
}

#survey.close {
    animation: moveOutLeft .5s;
    animation-fill-mode: forwards;
    opacity: 0;
    transition: all 1s;
    pointer-events: all;
    z-index: -1;
}

#surveyBar * {
    transition: all 500ms;
}

#surveyBar span.close,
#surveyPage span.close {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: url(/parts/survey/close.svg) 0 0 no-repeat;
    background-size: contain;
    cursor: pointer;
    z-index: 100;
}

#surveyPage span.close {
    display: none;
}

#surveyBar span.close:hover,
#surveyPage span.close:hover {
    opacity: .5;
}
#surveyBar video {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
}
#surveyBar > div {
    padding: 20px;
}
#surveyBar > div h2 {
    line-height: 1;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
}
#surveyBar > div p {
    line-height: 1.5;
    font-size: 1rem;
    margin-bottom: 20px;
}
#surveyBar > div a.button {
    display: block;
    border-radius: 5px;
    background-color: #F8D600;
    text-align: center;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    color: #333;
    text-decoration: none;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
}
#surveyBar > div a.button:hover {
    background-color: #fae245;
    color: #000;
}
#survey #surveyPage {
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: all 1s;
}
#survey.step2 {
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    pointer-events: all;
}
#survey.step2 #surveyBar {
    height: 0;
    overflow: hidden;
    transition: all 1s;
}
#survey.step2 #surveyPage {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
}
#survey.step2 #surveyPage iframe {
    border: 0;
    overflow-y: scroll;
}
#survey.step2 #surveyPage span.close {
    display: block;
    right: 20px;
    top: 0px;
    background-color: #ff0026;
}

@media screen and (max-width: 765px) {

    #survey {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        height: auto;
    }
    
    #surveyBar {
        width: 100%;
        max-width: none;
        max-height: 400px;
        left: 0px;
        bottom: 0px;
        animation: moveInBottom 1s ease-in-out;
        animation-fill-mode: forwards;
    }
    #survey.close {
        animation: moveOutBottom .6s ease-in-out;
        animation-fill-mode: forwards;
        pointer-events: none;
    }
}

@keyframes moveInLeft {
    0% {
      -webkit-transform:translateX(-320px);
    }
    100% {
        -webkit-transform:translateX(0);
    }
}

@keyframes moveOutLeft {
    to {
        -webkit-transform:translateX(-320px);
    }
}

@keyframes moveInBottom {
    0% {
      -webkit-transform:translateY(400px);
    }
    100% {
        -webkit-transform:translateY(0);
    }
}
@keyframes moveOutBottom {
    to {
        -webkit-transform:translateY(400px);
    }
}