/* Zalo OA */
.zalo-chat-widget {
  bottom: 17px !important;
  right: 42px !important;
  left: unset !important;
}

#huflit-contact-root-btn {
  position: fixed;
  right: 42px;
  bottom: 155px;
  width: 66px;
  height: 66px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 54, 129, 0.28);
  cursor: pointer;
  animation: bounce 1.5s infinite ease-in-out;
  transition: right 0.25s ease, bottom 0.25s ease, opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  overflow: visible;
}

#huflit-contact-root-btn:hover {
  transform: scale(1.08);
}

#huflit-contact-root-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.huflit-contact-root-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: #FF9900;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.huflit-contact-extra-icon {
  position: fixed;
  right: 50px;
  bottom: 164px;
  width: 58px;
  height: 58px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #005bac;
  box-shadow: 0 10px 26px rgba(0, 54, 129, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.72);
  transition: right 0.25s ease, bottom 0.25s ease, opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.huflit-contact-extra-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

#chat-toggle-btn,
.zalo-chat-widget {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.huflit-contact-icons-open #chat-toggle-btn,
body.huflit-contact-icons-open .zalo-chat-widget,
body.huflit-contact-icons-open .huflit-contact-extra-icon {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

body.huflit-contact-icons-open .huflit-contact-tiktok {
  right: 174px;
  bottom: 288px;
}

body.huflit-contact-icons-open .huflit-contact-mail {
  right: 218px;
  bottom: 212px;
}

body.huflit-contact-icons-open .huflit-contact-facebook {
  right: 218px;
  bottom: 124px;
}

body.huflit-contact-icons-open .zalo-chat-widget {
  right: 174px !important;
  bottom: 48px !important;
}

body.huflit-contact-icons-open #huflit-contact-root-btn {
  right: 50px;
  bottom: 164px;
  animation: none;
}

#admission-floating-link {
  position: fixed;
  left: 85px;
  bottom: 20px;
  z-index: 9997;
  display: block;
  width: min(190px, calc(100vw - 40px));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 54, 129, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: admissionFloat 2.8s ease-in-out infinite;
}

#admission-floating-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0, 54, 129, 0.32);
}

#admission-floating-link img {
  display: block;
  width: 100%;
  height: auto;
}

/* Floating AI chat button */
#chat-toggle-btn {
  position: fixed;
  right: 154px;
  bottom: 10px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  cursor: pointer;
  z-index: 9999;
  animation: bounce 1.5s infinite ease-in-out, pulse 3s infinite;
  transition: right 0.25s ease, bottom 0.25s ease, width 0.25s ease, height 0.25s ease, transform 0.3s ease;
}

body.huflit-contact-icons-open #chat-toggle-btn {
  right: 98px;
  bottom: 332px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: #005bac;
  box-shadow: 0 10px 26px rgba(0, 54, 129, 0.24);
  animation: none;
  transform: none;
}

.chat-label {
  color: #ffe2b1;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 34px;
  white-space: nowrap;
  gap: 4px;
  text-align: center;
}

body.huflit-contact-icons-open .chat-label {
  display: none;
}

#chat-toggle-btn:hover {
  transform: scale(1.1);
}

#chat-toggle-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

body.huflit-contact-icons-open #chat-toggle-btn img {
  width: 38px;
  height: 38px;
}

/* AI chat panel */
#chat-widget-container {
  position: fixed;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%);
  width: 400px;
  height: 500px;
  max-height: 90vh;
  overflow: hidden;
  z-index: 9998;
  display: none;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: fadeInUp 0.3s ease;
}

elevenlabs-convai {
  width: 100%;
  height: 100%;
  display: block;
}

#chat-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s;
}

#chat-close-btn:hover {
  transform: scale(1.2);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-5px);
  }

  60% {
    transform: translateY(3px);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(0, 132, 255, 0.4);
  }

  50% {
    box-shadow: 0 0 0 rgba(0, 132, 255, 0.8);
  }
}

@keyframes admissionFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 768px) {
  #admission-floating-link {
    left: 62px;
    bottom: 12px;
    width: min(132px, calc(100vw - 24px));
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  #admission-floating-link {
    left: 48px;
    width: min(110px, calc(100vw - 24px));
  }

  #huflit-contact-root-btn {
    right: 24px;
    bottom: 96px;
    width: 58px;
    height: 58px;
    padding: 6px;
  }

  .huflit-contact-root-label {
    top: calc(100% + 5px);
    font-size: 13px;
  }

  body.huflit-contact-icons-open #huflit-contact-root-btn {
    right: 42px;
    bottom: 104px;
  }

  body.huflit-contact-icons-open .zalo-chat-widget {
    right: 124px !important;
    bottom: 26px !important;
  }

  .huflit-contact-extra-icon {
    right: 42px;
    bottom: 104px;
    width: 52px;
    height: 52px;
  }

  body.huflit-contact-icons-open .huflit-contact-tiktok {
    right: 126px;
    bottom: 189px;
  }

  body.huflit-contact-icons-open .huflit-contact-mail {
    right: 155px;
    bottom: 138px;
  }

  body.huflit-contact-icons-open .huflit-contact-facebook {
    right: 155px;
    bottom: 80px;
  }

  body.huflit-contact-icons-open #chat-toggle-btn {
    right: 75px;
    bottom: 218px;
    width: 52px;
    height: 52px;
  }

  body.huflit-contact-icons-open #chat-toggle-btn img {
    width: 34px;
    height: 34px;
  }

  #chat-widget-container {
    width: 100%;
    left: 0;
    bottom: 0;
    transform: none;
    height: 90vh;
    max-height: 90vh;
    border-radius: 0;
  }

  .chat-label {
    display: none;
  }
}
