:root {
  --ksv-be-size: 104px;
  --ksv-be-gap: 16px;
  --ksv-be-bottom: 0px;
}
#ksv-be-ket-advisor {
  --ksv-be-ink: #39292c;
  --ksv-be-red: #8e2033;
  position: fixed;
  z-index: 86;
  right: max(var(--ksv-be-gap), env(safe-area-inset-right));
  bottom: calc(var(--ksv-be-gap) + var(--ksv-be-bottom) + env(safe-area-inset-bottom));
  display: grid;
  justify-items: end;
  font: 500 15px/1.45 "Be Vietnam Pro", system-ui, sans-serif;
  color: var(--ksv-be-ink);
}
#ksv-be-ket-advisor [hidden] { display: none; }
#ksv-be-ket-advisor *, #ksv-be-ket-advisor *::before { box-sizing: border-box; }
#ksv-be-ket-advisor button, #ksv-be-ket-advisor a {
  font-family: inherit;
  line-height: 1.35;
  cursor: pointer;
}
#ksv-be-ket-advisor :focus-visible { outline: 3px solid #92364c; outline-offset: 2px; }
.ksv-be-launch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ksv-be-red);
}
.ksv-be-launch[aria-expanded="true"] .ksv-be-hint { display: none; }
.ksv-be-hint {
  max-width: 135px;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #dec6c6;
  border-radius: 14px 14px 3px 14px;
  background: #fffaf7;
  color: var(--ksv-be-red);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  box-shadow: 0 2px 8px #451d2814;
}
.ksv-be-launch:hover .ksv-be-hint { border-color: var(--ksv-be-red); }
.ksv-be-character {
  position: relative;
  display: block;
  width: var(--ksv-be-size);
  height: var(--ksv-be-size);
  flex: none;
}
.ksv-be-pose { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  /* The edge follows the raised glove down to the wrist in the greeting artwork. */
  .ksv-be-hello .ksv-be-character {
    --ksv-hand-edge: 0 17%, 20% 17%, 21% 25.6%, 22.4% 26.1%, 24% 27%, 24.9% 28.6%, 24.5% 30.5%, 23% 32.6%, 22% 34%;
  }
  .ksv-be-hello .ksv-be-pose {
    clip-path: polygon(0 0, var(--ksv-hand-edge), 19.7% 36.3%, 10.6% 39.3%, 0 40%, 0 100%, 100% 100%, 100% 0);
  }
  .ksv-be-hello .ksv-be-character::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("tu-van-chao-3d.webp") center / contain no-repeat;
    clip-path: polygon(var(--ksv-hand-edge), 20.4% 37.8%, 11.6% 40.9%, 0 42%);
    transform-origin: 16.3% 39.6%;
    animation: ksv-be-wave 1.35s ease-in-out .35s;
  }
  @keyframes ksv-be-wave {
    0%, 100% { transform: rotate(0deg); }
    24% { transform: rotate(-15deg); }
    45%, 85% { transform: rotate(5deg); }
    67% { transform: rotate(-12deg); }
  }
}
#ksv-be-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  width: min(286px, calc(100vw - var(--ksv-be-gap) * 2));
  max-height: calc(100dvh - var(--ksv-be-size) - 14px - var(--ksv-be-bottom) - var(--ksv-be-gap) * 2 - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dbcac7;
  border-radius: 16px;
  background: #fff;
  padding: 13px 15px;
  box-shadow: 0 5px 22px #38181f20;
}
.ksv-be-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#ksv-be-title { font-size: 19px; line-height: 1.35; color: var(--ksv-be-ink); }
.ksv-be-close {
  width: 42px; height: 42px; border: 0; background: transparent;
  border-radius: 6px; color: var(--ksv-be-ink); font-size: 25px;
}
#ksv-be-panel .ksv-be-contact {
  display: flex; min-height: 43px; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; padding: 9px 13px; margin-bottom: 7px;
  border: 1px solid #d8c3c3; border-radius: 8px; text-decoration: none;
  background: #fffaf7; color: var(--ksv-be-red);
}
#ksv-be-panel .ksv-be-contact:first-of-type { background: var(--ksv-be-red); color: #fff; border-color: var(--ksv-be-red); }
#ksv-be-panel .ksv-be-contact:hover { text-decoration: underline; }
.ksv-be-answer { margin: 0; border-top: 1px solid #eee4e0; }
.ksv-be-answer:last-of-type { margin-bottom: 9px; }
#ksv-be-panel .ksv-be-answer summary { min-height: 42px; padding: 11px 0; cursor: pointer; color: var(--ksv-be-ink); font-size: 14px; font-weight: 650; }
#ksv-be-panel .ksv-be-answer p { margin: 0; font-size: 14px; line-height: 1.5; color: #544549; }
#ksv-be-panel .ksv-be-answer a { display: inline-flex; align-items: center; min-height: 36px; margin-right: 6px; color: var(--ksv-be-red); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.ksv-be-preference { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #655455; min-height: 36px; cursor: pointer; }
.ksv-be-preference input { margin: 0; accent-color: var(--ksv-be-red); }

body:has(#ksv-be-ket-advisor) .ch-float-btn:is(.is-zalo, .is-call) { display: none; }
body:has(#ksv-be-ket-advisor) .ch-float {
  bottom: calc(var(--ksv-be-bottom) + var(--ksv-be-gap) + var(--ksv-be-size) + 14px + env(safe-area-inset-bottom));
}
body:has(.w-pdp-sticky.is-visible) { --ksv-be-bottom: 90px; }
@media (max-width: 991.98px) {
  body:has(.ch-mnav) { --ksv-be-bottom: 76px; }
  body:has(.ch-mnav):has(.w-pdp-sticky.is-visible) { --ksv-be-bottom: 150px; }
}
#ksv-be-ket-advisor:has(.ksv-be-launch[aria-expanded="true"]) { z-index: 87; }
body:has(.ksv-be-launch[aria-expanded="true"]) .ch-float {
  visibility: hidden;
}
@media (max-width: 600px) {
  :root { --ksv-be-size: 76px; --ksv-be-gap: 10px; }
  .ksv-be-hint { max-width: 116px; font-size: 12px; padding: 6px 9px; }
}
@media print { #ksv-be-ket-advisor { display: none; } }
