.khen-float-actions {
  position: fixed;
  right: 20px;
  bottom: 60px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.khen-float-actions.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.khen-float-chat-wrap {
  position: relative;
}

.khen-float-action-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9999px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.khen-float-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.97);
}

.khen-float-action-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.khen-float-action-btn i {
  width: 22px;
  height: 22px;
}

.khen-float-action-btn--chat {
  position: relative;
  background: #ff7900;
  color: #ffffff;
  overflow: visible;
  z-index: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), 0 0 0 3px rgba(255, 121, 0, 0.14);
}

.khen-float-action-btn--chat i {
  width: 22px;
  height: 22px;
  animation: khen-float-chat-icon-wave 1.8s ease-in-out infinite;
}

.khen-float-action-btn--chat::before,
.khen-float-action-btn--chat::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 211, 171, 0.72);
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

@keyframes khen-float-wave {
  0% {
    opacity: 0.6;
    transform: scale(0.92);
  }

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

@keyframes khen-float-chat-icon-wave {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }

  35% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.38));
  }

  70% {
    transform: scale(0.98);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
}

.khen-float-action-btn--chat::before {
  animation: khen-float-wave 1.9s ease-out infinite;
}

.khen-float-action-btn--chat::after {
  animation: khen-float-wave 1.9s ease-out infinite 0.65s;
}

.khen-float-chat-wrap.is-open .khen-float-action-btn--chat {
  background: #ec6a00;
}

.khen-float-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 220px;
  border-radius: 12px;
  background: #f3f3f3;
  border: 1px solid #ececec;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.khen-float-chat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  border-radius: 10px;
  padding: 0 10px;
  background: #e9e9e9;
  color: #111111;
  text-decoration: none;
  font-family: "Khen BeVietnamPro", sans-serif;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  transition: filter 150ms ease;
}

.khen-float-chat-link:hover {
  filter: brightness(0.96);
}

.khen-float-chat-link img {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  object-fit: cover;
  flex: 0 0 28px;
}

.khen-float-action-btn--backtop {
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.khen-float-action-btn--backtop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.khen-float-action-btn--backtop i {
  color: #002f68;
}

.khen-float-action-btn:focus-visible,
.khen-float-chat-link:focus-visible {
  outline: 2px solid #ff7900;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .khen-float-actions {
    right: 10px;
    bottom: 80px;
    transform: none;
  }

  .khen-float-chat-panel {
    width: 206px;
  }
}
