.nm-widget {
  position: fixed;
  z-index: 9990;
  width: 80px;
  height: 80px;
  font-family: Roboto, Arial, sans-serif;
  font-style: normal;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.nm-widget *,
.nm-widget *::before,
.nm-widget *::after {
  box-sizing: border-box;
}
.nm-widget a {
  text-decoration: none;
  border: 0;
}

/* Главная кнопка */
.nm-main {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .33);
  perspective: 400px;
}
.nm-main__icon {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: rotateY(90deg);
  transition: transform .25s linear, opacity .1s linear;
}
.nm-main__icon.is-active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transform: rotateY(0);
}
.nm-main__icon svg {
  width: 40px;
  height: 40px;
}

/* Подписи */
.nm-label {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 18px;
  background: var(--nm-label-bg, rgba(0, 0, 0, .78));
  color: var(--nm-label-color, #fff);
  font-size: 14px;
  line-height: 24px;
  white-space: nowrap;
  cursor: pointer;
}
.nm-label--main {
  position: absolute;
  top: 16px;
  display: none;
  padding: 12px 16px;
  border-radius: 24px;
  font-size: 16px;
}
.nm-widget--left .nm-label--main {
  left: 87px;
}
.nm-widget--right .nm-label--main {
  right: 87px;
}
.nm-widget.is-open:not(.is-touch) .nm-main__icon.is-active .nm-label--main {
  display: block;
}

/* Список */
.nm-list {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 80px;
  margin: 0;
  padding: 0 0 16px;
  list-style: none;
  visibility: hidden;
}
.nm-widget--right .nm-list {
  left: auto;
  right: 0;
}
.nm-item {
  display: block;
  margin: 0;
  padding: 8px 0 0 13px;
  background: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(.4) translateY(150px);
}
.nm-item::before {
  display: none;
}
.nm-widget--right .nm-item {
  padding: 8px 13px 0 0;
}
.nm-item__link {
  display: flex;
  align-items: center;
}
.nm-widget--right .nm-item__link {
  flex-direction: row-reverse;
}
.nm-item__icon {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 0 5px 5px;
  border-radius: 999px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .33);
  color: #fff;
}
.nm-widget--right .nm-item__icon {
  margin: 0 5px 5px 0;
}
.nm-item__icon svg {
  width: 24px;
  height: 24px;
}
.nm-item .nm-label {
  margin: 0 0 5px 5px;
}
.nm-widget--right .nm-item .nm-label {
  margin: 0 5px 5px 0;
}
.nm-widget.is-open .nm-list {
  visibility: visible;
}
.nm-widget.is-open .nm-item {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  transition: .3s;
}

/* Крестик на телефоне */
.nm-close {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transform: rotateY(90deg);
  transition: transform .25s linear;
  cursor: pointer;
}
.nm-close::before,
.nm-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 3px;
  margin: -1.5px 0 0 -12px;
  border-radius: 2px;
  background: #65676a;
  opacity: .7;
  transform: rotate(45deg);
}
.nm-close::after {
  transform: rotate(-45deg);
}
.nm-widget.is-open.is-touch .nm-close {
  opacity: 1;
  pointer-events: auto;
  transform: rotateY(0);
}

/* Волны */
.nm-waves {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.nm-wave {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  border-radius: 100%;
  background: var(--nm-wave, var(--nm-current, #40c351));
  opacity: 0;
  transform-origin: 50% 50%;
}
.nm-wave--1 {
  width: 100%;
  height: 100%;
}
.nm-wave--2,
.nm-wave--3 {
  width: 70%;
  height: 70%;
}
.nm-anim-waves .nm-wave--1 {
  animation: nm-wave-1 3.5s infinite;
}
.nm-anim-waves .nm-wave--2 {
  animation: nm-wave-2 3.5s infinite;
}
.nm-anim-waves .nm-wave--3 {
  animation: nm-wave-3 3.5s infinite;
}
.nm-widget.is-open .nm-waves,
.nm-widget:not(.nm-anim-waves) .nm-waves {
  display: none;
}

@keyframes nm-wave-1 {
  0%, 42.86% { opacity: .66; transform: scale(1); animation-timing-function: ease-in-out; }
  100% { opacity: 0; transform: scale(2.39); }
}
@keyframes nm-wave-2 {
  0%, 42.86% { opacity: .66; transform: scale(1); animation-timing-function: ease-in-out; }
  100% { opacity: 0; transform: scale(3.17); }
}
@keyframes nm-wave-3 {
  0%, 42.86% { opacity: .66; transform: scale(.42); animation-timing-function: ease-in-out; }
  100% { opacity: 0; transform: scale(2.79); }
}

/* Подпрыгивание */
.nm-widget.is-bouncing {
  animation: nm-bounce .7s infinite;
}
@keyframes nm-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  60% { transform: translateY(-15px); }
}

@media print {
  .nm-widget {
    display: none;
  }
}
