/**
* Floating Zuugsi
*/

#main {
  position: relative;
}

.hidden {
  display: none;
}

.floating-zuugsi {
  position: fixed;
  bottom: 9rem;
  right: 1.5rem;
  z-index: 1000;

  @media screen and (min-width: 60rem) {
    bottom: 6rem;
  }

  @media screen and (min-width: 78rem) {
    bottom: 4rem;
  }
}

.floating-zuugsi--active {
  #floating-zuugsi__inner {
    display: block;
  }
  #floating-zuugsi__open {
    display: none;
  }
}

#floating-zuugsi__inner {
  display: none;
}

#floating-zuugsi_send {
  display: none;
}

#floating-zuugsi__close {
  display: block;
  margin-left: auto;
}

#floating-zuugsi__open {
  color: #ff8800;
  font-size: 3rem;
  font-weight: bold;
  -webkit-text-stroke: 1px black;
  border: none;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.6));

  &:hover,
  &:focus {
    color: #ff8800;
    background: none;
  }
}

.floating-zuugsi__content {
  width: 16rem;
  position: relative;
}

.floating-zuugsi__lottie {
  width: 16rem;
  height: 16rem;
}

.floating-zuugsi__text {
  display: none;
  background-color: #fff;
  border: 2px solid #ff8800;
  margin-inline: 1rem;
  hyphens: auto;

  padding: 1.5rem;
  position: relative;

  &:has(.floating-zuugsi__text__inner:not(:empty)) {
    display: block;
  }

  &::before {
    content: "";
    width: 0px;
    height: 0px;
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ff8800;
    border-bottom: 10px solid transparent;
    right: 50%;
    bottom: -21px;
    translate: 50%;
  }

  &::after {
    content: "";
    width: 0px;
    height: 0px;
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
    border-bottom: 10px solid transparent;
    right: 50%;
    bottom: -18px;
    translate: 50%;
  }
}

.floating-zuugsi__button {
  width: 2rem;
  height: 2rem;
  border: 2px solid black;
  border-radius: 50%;
  background: #ff8800;
  color: black;

  &:hover,
  &:focus {
    border: 2px solid black;
    background: #ff8800;
    color: black;
  }

  > svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-inline: auto;
  }
}

.zuugsi-button {
  display: inline-block;
}

.zuugsi-button__content {
  display: none;
}

.zuugsi-indicator-bar {
  position: relative;
  width: 1rem;
  background-color: hsl(32, 100%, 95%);
  height: 100%;
}

button.zuugsi-indicator {
  position: absolute;
  height: 0.75rem;
  width: 0.75rem;
  border-radius: 50%;
  background-color: #ff8800;
  border: 1px solid rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  left: 50%;
  translate: -50%;

  &:hover,
  &:focus {
    background-color: #ff8800;
    border-color: rgba(0, 0, 0, 0.6);
  }
}

.zuugsi-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
}
