:root {
  --joinchat-ico: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0s4.686 12.283 0 16.97a12 12 0 0 1-13.754 2.299l-5.814.735a.392.392 0 0 1-.438-.44l.748-5.788A12 12 0 0 1 3.517 3.517zm3.61 17.043.3.158a9.85 9.85 0 0 0 11.534-1.758c3.843-3.843 3.843-10.074 0-13.918s-10.075-3.843-13.918 0a9.85 9.85 0 0 0-1.747 11.554l.16.303-.51 3.942a.196.196 0 0 0 .219.22zm6.534-7.003-.933 1.164a9.84 9.84 0 0 1-3.497-3.495l1.166-.933a.79.79 0 0 0 .23-.94L9.561 6.96a.79.79 0 0 0-.924-.445l-2.023.524a.797.797 0 0 0-.588.88 11.754 11.754 0 0 0 10.005 10.005.797.797 0 0 0 .88-.587l.525-2.023a.79.79 0 0 0-.445-.923L14.6 13.327a.79.79 0 0 0-.94.23z'/%3E%3C/svg%3E");
}

.joinchat {
  --sep: 20px;
  --bottom: var(--sep);
  --s: 60px;
  --h: calc(var(--s)/2);

  display: block;
  transform: scale3d(1, 1, 1);
  position: fixed;
  z-index: 9000;
  right: var(--sep);
  bottom: var(--bottom);
}

.joinchat * {
  box-sizing: border-box;
}

.joinchat__qr,
.joinchat__chatbox {
  display: none;
}

.joinchat__tooltip {
  opacity: 0;
}

.joinchat__button {
  position: absolute;
  z-index: 2;
  bottom: 8px;
  right: 8px;
  height: var(--s);
  width: var(--s);
  background: #25d366 var(--joinchat-ico, none) center / 60% no-repeat;
  color: inherit;
  border-radius: 50%;
  box-shadow: 1px 6px 24px 0 rgba(7, 94, 84, 0.24);
}

/* LEFT */
.joinchat--left {
  right: auto;
  left: var(--sep);
}

.joinchat--left .joinchat__button {
  right: auto;
  left: 8px;
}

/* END LEFT */

/* ICO */
.joinchat__button__ico {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: 50%;
  overflow: hidden;
  color: hsl(0deg 0% clamp(0%, var(--bw)*1000%, 100%) / clamp(70%, var(--bw)*1000%, 100%)) !important;
}

.joinchat__button__ico svg {
  width: var(--ico-size, 100%);
  height: var(--ico-size, 100%);
  margin: calc((100% - var(--ico-size, 100%))/2);
}

.joinchat__button:has(.joinchat__button__ico) {
  background: hsl(var(--ch) var(--cs) var(--cl));
  box-shadow: 1px 6px 24px 0 hsl(var(--ch) var(--cs) calc(var(--cl) - 10%) / 24%);
}

.joinchat__button:has(.joinchat__button__ico):hover,
.joinchat__button:has(.joinchat__button__ico):active {
  background: hsl(var(--ch) var(--cs) calc(var(--cl) + 20%));
}

/* END ICO */

/* IMAGE */
.joinchat__button__image {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0;
}

.joinchat__button__image img,
.joinchat__button__image video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.joinchat--img .joinchat__button__image {
  opacity: 1;
  animation: none;
}

/* END IMAGE */

@media (orientation: portrait) and (width >=481px), (orientation: landscape) and (height >=481px) {
  .joinchat--mobile {
    display: none !important;
  }
}

@media (width <=480px), (orientation: landscape) and (height <=480px) {
  .joinchat {
    --sep: 6px
  }
}