.nmw-floating-contact {
  --nmw-contact-navy: #0b1f33;
  --nmw-contact-blue: #0977d1;
  --nmw-contact-orange: #fc7010;
  position: fixed;
  z-index: 99990;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.2;
  isolation: isolate;
}

.nmw-floating-contact--right {
  right: 22px;
}

.nmw-floating-contact--left {
  left: 22px;
  align-items: flex-start;
}

.nmw-floating-contact *,
.nmw-floating-contact *::before,
.nmw-floating-contact *::after {
  box-sizing: border-box;
}

.nmw-floating-contact__link {
  --nmw-channel-color: var(--nmw-contact-blue);
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 76%);
  border-radius: 50%;
  outline: none;
  background: var(--nmw-channel-color);
  color: #fff;
  box-shadow: 4px 8px 22px rgb(11 31 51 / 20%);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.2, 0.65, 0.3, 1), box-shadow 180ms cubic-bezier(0.2, 0.65, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.nmw-floating-contact__link--phone {
  --nmw-channel-color: var(--nmw-contact-orange);
}

.nmw-floating-contact__link--zalo {
  --nmw-channel-color: #0068ff;
}

.nmw-floating-contact__link--messenger {
  --nmw-channel-color: #087fff;
}

.nmw-floating-contact__link--facebook {
  --nmw-channel-color: #1877f2;
}

.nmw-floating-contact__link:hover,
.nmw-floating-contact__link:focus-visible {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 5px 12px 28px rgb(11 31 51 / 26%);
}

.nmw-floating-contact__link:focus-visible {
  outline: 3px solid rgb(9 119 209 / 34%);
  outline-offset: 3px;
}

.nmw-floating-contact__link svg {
  display: block;
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nmw-floating-contact__link--facebook svg {
  stroke-width: 2.1;
}

.nmw-floating-contact__link--zalo svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: none;
}

.nmw-floating-contact__link--phone::after {
  position: absolute;
  z-index: -1;
  inset: -5px;
  border: 2px solid var(--nmw-contact-orange);
  border-radius: 50%;
  content: "";
  opacity: 0;
  pointer-events: none;
  animation: nmw-contact-ring 2.6s cubic-bezier(0.2, 0.65, 0.3, 1) infinite;
}

.nmw-floating-contact__tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 11px);
  min-width: max-content;
  padding: 8px 11px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 9px;
  background: var(--nmw-contact-navy);
  color: #fff;
  box-shadow: 3px 6px 18px rgb(11 31 51 / 18%);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity 150ms ease, transform 180ms cubic-bezier(0.2, 0.65, 0.3, 1);
  white-space: nowrap;
}

.nmw-floating-contact--left .nmw-floating-contact__tooltip {
  right: auto;
  left: calc(100% + 11px);
  transform: translate(-6px, -50%);
}

.nmw-floating-contact__link:hover .nmw-floating-contact__tooltip,
.nmw-floating-contact__link:focus-visible .nmw-floating-contact__tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

@keyframes nmw-contact-ring {
  0%, 55% {
    opacity: 0;
    transform: scale(0.88);
  }

  62% {
    opacity: 0.58;
  }

  88%, 100% {
    opacity: 0;
    transform: scale(1.32);
  }
}

@media (max-width: 549px) {
  .nmw-floating-contact {
    right: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 20px);
    flex-direction: row;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid #dfe7ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 4px 10px 30px rgb(11 31 51 / 20%);
    transform: translateX(-50%);
  }

  .nmw-floating-contact--hide-mobile {
    display: none;
  }

  .nmw-floating-contact__link {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    box-shadow: 2px 5px 13px rgb(11 31 51 / 18%);
  }

  .nmw-floating-contact__tooltip {
    display: none;
  }
}

@media (max-width: 359px) {
  .nmw-floating-contact {
    gap: 6px;
    padding: 7px;
  }

  .nmw-floating-contact__link {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .nmw-floating-contact__link svg {
    width: 22px;
    height: 22px;
  }

  .nmw-floating-contact__link--zalo svg {
    width: 27px;
    height: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nmw-floating-contact__link,
  .nmw-floating-contact__tooltip {
    transition: none;
  }

  .nmw-floating-contact__link--phone::after {
    animation: none;
  }
}

@media print {
  .nmw-floating-contact {
    display: none !important;
  }
}
