﻿@keyframes fadeIn {
  0% {
    opacitiy: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes slideIn {
  0% {
    -ms-transform: translate(0px, 40px); /* IE 9 */
    -webkit-transform: translate(0px, 40px); /* Safari */
    transform: translate(0px, 40px); /* Standard syntax */
  }

  100% {
    -ms-transform: scale(1, 1);
    -webkit-transform: scale(1, 1);
    transform: scale(1, 1);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#wmlivechatbutton {
  -webkit-transform-style: preserve-3d;
  position: fixed;
  z-index: 1000000;
  bottom: 30px;
  right: 20px;
  display: inline-block;
  background-repeat: no-repeat;
  width: 60px;
  height: 60px;
  background: rgb(44, 135, 255) url(/assets/svg/Livechat-icon.svg);
  background-size: 40px 40px;
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 30px;
  -moz-border-radius: 30px;
  -webkit-border-radius: 30px;
  -webkit-box-shadow: 0px 0px 55px 0px rgba(173, 173, 173, 1);
  -moz-box-shadow: 0px 0px 55px 0px rgba(173, 173, 173, 1);
  box-shadow: 0px 0px 55px 0px rgba(173, 173, 173, 1);
  animation: 1s ease-out 0s 1 fadeIn;
}

#wmlivechatbutton.expanded {
  background-image: url(/assets/svg/Livechat-icon-open.svg);
  box-shadow: none;
}

#wmlivechatbutton.left {
  right: auto;
  left: 20px;
}

#wmlivechatbox {
  position: fixed;
  z-index: 100000;
  right: 20px;
  -webkit-box-shadow: 0px 21px 55px -18px rgba(173, 173, 173, 1);
  -moz-box-shadow: 0px 21px 55px -18px rgba(173, 173, 173, 1);
  box-shadow: 0px 21px 55px -18px rgba(173, 173, 173, 1);
  animation: 0.25s ease-in-out 0s 1 slideIn;
  overflow: hidden;
}

#wmlivechatbox.animation {
  -webkit-transition: height .4s linear;
  transition: height .4s linear;
}

#wmlivechatbox.toggled {
  height: 0;
  min-height: 0;
  display: none;
}

#loading-holder {
  display: block;
  padding-top: 50%;
  text-align: center;
  width: 100%;
  height: 100%;
  background: #fff;
  color: #BFBFBF;
}

#loader {
  border: 16px solid #f4f7f9; /* Light grey */
  border-top: 16px solid #d0d7dc; /* Blue */
  border-radius: 50%;
  width: 120px;
  height: 120px;
  margin: 2em auto;
  animation: spin 1s linear infinite;
  color: #d0d7dc;
}

#wmlivechatframe {
  height: 590px;
  width: 370px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

#wmlivechatbutton + #wmlivechatbox {
  display: none;
}

#wmlivechatbutton.expanded + #wmlivechatbox {
  display: block;
}

@media only screen and (max-width: 590px) {
  #wmlivechatbox {
    min-height: 100%;
    max-height: 100%;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    margin: 0;
  }

  #wmlivechatbox.animation {
    top: auto;
    bottom: 0;
  }

  body.fix-body {
    width: 100vw;
    height: 100vh;
    max-height: 100%;
    max-width: 100%;
    overflow: hidden;
    position: fixed;
  }

  #wmlivechatframe {
    height: 100%;
    width: 100vw;
    overflow: hidden;
    display: block;
  }

  #wmlivechatbutton {
    bottom: 10px;
    right: 10px;
  }

  #wmlivechatbutton.left {
    left: 10px;
  }

  #wmlivechatbutton.expanded {
    top: 14px;
    width: 45px;
    height: 45px;

    /* important statement because the backgroundcolor is inline */
    background-color: transparent !important;
  }
}

@media only screen and (min-width: 590px) {
  #wmlivechatframe {
    border-radius: 14px;
    -moz-border-radius: 14px;
    -webkit-border-radius: 14px;
  }

  #wmlivechatbox.left {
    right: auto;
    left: 20px;
  }

  #wmlivechatbox {
    border-radius: 14px;
    -moz-border-radius: 14px;
    -webkit-border-radius: 14px;
    max-height: 590px;
    bottom: 110px;
    width: 370px;
    height: 590px;
  }
}

#wmlivechatbox.inline {
  width: 100%;
  position: relative;
  bottom: 0;
  right: 0;
  float: left;
  box-shadow: none;
}

#wmlivechatbox.inline #wmlivechatframe {
  width: 100%;
  box-shadow: none;
}
