:root {
  --yoozly-chat-color-hover: #0d47a1;
  --yoozly-chat-color: #c74f2e;
  --yoozly-chat-cta-position: 30px;
  --yoozly-chat-cta-size: 60px;
  --yoozly-chat-height: 600px;
  --yoozly-chat-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --yoozly-chat-width: 400px;
}

.yoozly-chat {
  bottom: 0;
  display: flex;
  flex-direction: column;
  height: 80%;
  position: fixed;
  left: 50%;
  transform: translateY(var(--yoozly-chat-height));
  transition: var(--yoozly-chat-transition);
  opacity: 0;
  width: 90%;
  z-index: 1000;
  pointer-events: none;
  @media all and (min-width: 600px) {
    left: auto;
    right: var(--yoozly-chat-cta-position);
    width: var(--yoozly-chat-width);
    height: var(--yoozly-chat-height);
  }
}

.yoozly-chat.active {
  --cta-and-margin: calc(var(--yoozly-chat-cta-position) + 15px + var(--yoozly-chat-cta-size));
  opacity: 1;
  transform: translateX(-50%) translateY(calc(var(--cta-and-margin) * -1));
  pointer-events: auto;
  @media all and (min-width: 600px) {
    transform: translateY(calc(var(--cta-and-margin) * -1));
  }
}

.yoozly-chat__container {
  border-radius: 10px;
  box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.2);
  height: var(--yoozly-chat-height);
  overflow: hidden;
}

.yoozly-chat-cta {
  align-items: center;
  background-color: var(--yoozly-chat-color);
  border-radius: 50%;
  border: none;
  bottom: var(--yoozly-chat-cta-position);
  cursor: pointer;
  display: flex;
  font-weight: bold;
  height: var(--yoozly-chat-cta-size);
  justify-content: center;
  position: fixed;
  right: var(--yoozly-chat-cta-position);
  width: var(--yoozly-chat-cta-size);
  z-index: 1001;
  &:before {
    content: "";
    border: 1px solid #c74f2e;
    border-radius: 50px;
    z-index: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    opacity: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease-in-out;
  }
}

.yoozly-chat-cta:hover,
.yoozly-chat-cta.active {
  background-color: var(--yoozly-chat-color);
  /* transform: scale(1.1); */
  transition: all 0.2s ease-out;
  &:before {
    opacity: 1;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
  }
}

.yoozly-chat-cta .svg-close,
.yoozly-chat-cta .svg-open {
  height: 30px;
  margin: auto;
  opacity: 0;
  position: absolute;
  transform: translateY(10px);
  transition: var(--yoozly-chat-transition);
  width: 30px;
}

.yoozly-chat-cta .svg-open,
.yoozly-chat-cta.active .svg-close {
  opacity: 1;
  transform: translateY(0);
}

.yoozly-chat-cta.active .svg-open {
  opacity: 0;
  transform: translateY(-10px);
}
