/* Frontend styles */

/* Floating messenger button */
.vch-chat {
  --vch-chat-button-size: 56px;
  --vch-chat-icon-size: 24px;
  position: fixed;
  bottom: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.vch-chat--right {
  right: 16px;
  align-items: flex-end;
}

.vch-chat--left {
  left: 16px;
  align-items: flex-start;
}

.vch-chat * {
  box-sizing: border-box;
}

.vch-chat-items {
  width: var(--vch-chat-button-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  pointer-events: none;
}

.vch-chat-item,
.vch-chat-main {
  padding: 0;
  width: var(--vch-chat-button-size);
  height: var(--vch-chat-button-size);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  transform: translateY(0);
  opacity: 1;
  transition: transform .25s ease, opacity .2s ease, filter .2s ease, background-color .2s ease, color .2s ease;
}

.vch-chat-item {
  color: var(--vch-chat-item-color, #fff);
  background: var(--vch-chat-item-bg, #333);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .18);
}

.vch-chat-item:hover {
  color: var(--vch-chat-item-color-hover, #fff);
  background: var(--vch-chat-item-bg-hover, #222);
}

.vch-chat-main {
  color: var(--vch-chat-main-color, #fff);
  background: var(--vch-chat-main-bg, #4aa3ff);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.vch-chat-main:hover {
  color: var(--vch-chat-main-color-hover, #fff);
  background: var(--vch-chat-main-bg-hover, #4169e1);
}

.vch-chat-icon,
.vch-chat-main-icon {
  width: var(--vch-chat-icon-size);
  height: var(--vch-chat-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: currentColor;
  flex: 0 0 var(--vch-chat-icon-size);
}

.vch-chat-icon svg,
.vch-chat-main-icon svg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  flex: 0 0 auto;
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item {
  opacity: 0;
  pointer-events: none;
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item:nth-child(1) {
  transform: translateY(12px) scale(.9);
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item:nth-child(2) {
  transform: translateY(24px) scale(.9);
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item:nth-child(3) {
  transform: translateY(36px) scale(.9);
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item:nth-child(4) {
  transform: translateY(48px) scale(.9);
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item:nth-child(5) {
  transform: translateY(60px) scale(.9);
}

.vch-chat[data-open="0"] .vch-chat-items .vch-chat-item:nth-child(6) {
  transform: translateY(72px) scale(.9);
}

.vch-chat[data-open="1"] .vch-chat-items {
  pointer-events: auto;
}

.vch-chat-waves {
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  pointer-events: none;
}

.vch-chat--anim-waves .vch-chat-waves::before,
.vch-chat--anim-waves .vch-chat-waves::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .55);
  animation: vch-chat-pulse 1.8s ease-out infinite;
}

.vch-chat--anim-waves .vch-chat-waves::after {
  animation-delay: .9s;
}

@keyframes vch-chat-pulse {
  0% {
    transform: scale(.5);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.vch-chat--anim-pulse .vch-chat-main {
  animation: vch-chat-breath 1.6s ease-in-out infinite;
}

@keyframes vch-chat-breath {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.vch-chat--anim-shake .vch-chat-main {
  animation: vch-chat-shake 2.2s ease-in-out infinite;
}

@keyframes vch-chat-shake {
  0%,
  90%,
  100% {
    transform: translateX(0);
  }

  92% {
    transform: translateX(-2px);
  }

  94% {
    transform: translateX(2px);
  }

  96% {
    transform: translateX(-2px);
  }

  98% {
    transform: translateX(2px);
  }
}

.vch-chat--anim-bell .vch-chat-main {
  transform-origin: 50% 0%;
  animation: vch-chat-bell 2.6s ease-in-out infinite;
}

@keyframes vch-chat-bell {
  0%,
  86%,
  100% {
    transform: rotate(0deg);
  }

  88% {
    transform: rotate(8deg);
  }

  90% {
    transform: rotate(-8deg);
  }

  92% {
    transform: rotate(7deg);
  }

  94% {
    transform: rotate(-7deg);
  }

  96% {
    transform: rotate(5deg);
  }

  98% {
    transform: rotate(-5deg);
  }
}

/* Single contact shortcode */
.vch-data-iconlink,
.vch-data-static-iconlink,
.vch-data-button--with-icon,
.vch-button--with-icon,
.vch-list-iconlink,
.vch-list-static-iconlink,
.vch-list-button--with-icon {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.vch-data-icon-only-icon,
.vch-data-iconlink-icon,
.vch-data-button-icon,
.vch-button-icon,
.vch-button-icon-only-icon,
.vch-button-iconlink-icon,
.vch-list-icon-only-icon,
.vch-list-iconlink-icon,
.vch-list-button-icon,
.vch-row-icon,
.vch-helper-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: currentColor;
  flex: 0 0 auto;
}

.vch-data-icon-only-icon svg,
.vch-data-iconlink-icon svg,
.vch-data-button-icon svg,
.vch-button-icon svg,
.vch-button-icon-only-icon svg,
.vch-button-iconlink-icon svg,
.vch-list-icon-only-icon svg,
.vch-list-iconlink-icon svg,
.vch-list-button-icon svg,
.vch-row-icon svg,
.vch-helper-icon svg {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

/* Contact list shortcode */
.vch-list {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.vch-list-link,
.vch-list-iconlink,
.vch-list-static-iconlink,
.vch-list-text,
.vch-list-icon-only,
.vch-list-label,
.vch-list-icon-only-icon,
.vch-list-iconlink-icon {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.vch-list-link,
.vch-list-iconlink,
.vch-list-static-iconlink,
.vch-list-icon-only {
  border: 0;
  border-radius: 0;
  padding: 0;
}

.vch-list-link:not(.button):not(.btn),
.vch-list-iconlink:not(.button):not(.btn),
.vch-list-static-iconlink,
.vch-list-icon-only {
  color: inherit;
  text-decoration: none;
}

.vch-list-link:not(.button):not(.btn):hover,
.vch-list-link:not(.button):not(.btn):focus,
.vch-list-iconlink:not(.button):not(.btn):hover,
.vch-list-iconlink:not(.button):not(.btn):focus {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: inherit;
  text-decoration: none;
}

/* Contact icon row */
.vch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--vch-row-gap, .75rem);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  list-style: none;
}

.vch-row--center {
  justify-content: center;
}

.vch-row--right {
  justify-content: flex-end;
}

.vch-row--between {
  justify-content: space-between;
}

.vch-row--around {
  justify-content: space-around;
}

.vch-row--evenly {
  justify-content: space-evenly;
}

.vch-row-link,
.vch-row-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--vch-row-color, currentColor);
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  line-height: 1;
  text-decoration: none;
}

.vch-row-link:hover,
.vch-row-link:focus {
  color: var(--vch-row-hover-color, var(--vch-row-color, currentColor));
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-decoration: none;
}

.vch-row-icon {
  font-size: var(--vch-row-icon-size, 1em);
}

.vch-row-icon svg {
  width: var(--vch-row-icon-size, auto);
  height: var(--vch-row-icon-size, auto);
}

/* Icon color normalization */
.vch-data-icon-only-icon,
.vch-data-iconlink-icon,
.vch-data-button-icon,
.vch-button-icon,
.vch-button-icon-only-icon,
.vch-button-iconlink-icon,
.vch-list-icon-only-icon,
.vch-list-iconlink-icon,
.vch-list-button-icon,
.vch-row-icon,
.vch-chat-icon,
.vch-chat-main-icon,
.vch-helper-icon {
  color: currentColor;
}

.vch-data-icon-only-icon .bi,
.vch-data-iconlink-icon .bi,
.vch-data-button-icon .bi,
.vch-button-icon .bi,
.vch-button-icon-only-icon .bi,
.vch-button-iconlink-icon .bi,
.vch-list-icon-only-icon .bi,
.vch-list-iconlink-icon .bi,
.vch-list-button-icon .bi,
.vch-row-icon .bi,
.vch-chat-icon .bi,
.vch-chat-main-icon .bi,
.vch-helper-icon .bi {
  display: block;
  font-size: 1em;
  line-height: 1;
}

.vch-data-icon-only-icon svg [fill]:not([fill="none"]),
.vch-data-iconlink-icon svg [fill]:not([fill="none"]),
.vch-data-button-icon svg [fill]:not([fill="none"]),
.vch-button-icon svg [fill]:not([fill="none"]),
.vch-button-icon-only-icon svg [fill]:not([fill="none"]),
.vch-button-iconlink-icon svg [fill]:not([fill="none"]),
.vch-list-icon-only-icon svg [fill]:not([fill="none"]),
.vch-list-iconlink-icon svg [fill]:not([fill="none"]),
.vch-list-button-icon svg [fill]:not([fill="none"]),
.vch-row-icon svg [fill]:not([fill="none"]),
.vch-chat-icon svg [fill]:not([fill="none"]),
.vch-chat-main-icon svg [fill]:not([fill="none"]),
.vch-helper-icon svg [fill]:not([fill="none"]) {
  fill: currentColor;
}

.vch-data-icon-only-icon svg [stroke]:not([stroke="none"]),
.vch-data-iconlink-icon svg [stroke]:not([stroke="none"]),
.vch-data-button-icon svg [stroke]:not([stroke="none"]),
.vch-button-icon svg [stroke]:not([stroke="none"]),
.vch-button-icon-only-icon svg [stroke]:not([stroke="none"]),
.vch-button-iconlink-icon svg [stroke]:not([stroke="none"]),
.vch-list-icon-only-icon svg [stroke]:not([stroke="none"]),
.vch-list-iconlink-icon svg [stroke]:not([stroke="none"]),
.vch-list-button-icon svg [stroke]:not([stroke="none"]),
.vch-row-icon svg [stroke]:not([stroke="none"]),
.vch-chat-icon svg [stroke]:not([stroke="none"]),
.vch-chat-main-icon svg [stroke]:not([stroke="none"]),
.vch-helper-icon svg [stroke]:not([stroke="none"]) {
  stroke: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .vch-chat--anim-waves .vch-chat-waves::before,
  .vch-chat--anim-waves .vch-chat-waves::after,
  .vch-chat--anim-pulse .vch-chat-main,
  .vch-chat--anim-shake .vch-chat-main,
  .vch-chat--anim-bell .vch-chat-main {
    animation: none !important;
  }

  .vch-chat-item,
  .vch-chat-main {
    transition: none !important;
  }
}
