/* Font SVN-Mont setup */
@font-face {
  font-family: 'SVN-Mont';
  src: url('../fonts/SVN-MontBold.woff2') format('woff2'),
    url('../fonts/SVN-MontBold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SVN-Mont';
  src: url('../fonts/SVN-Mont.woff2') format('woff2'),
    url('../fonts/SVN-Mont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.tpo-button-contact-box,
.tpo-mobile-toggle,
#tpodev-contact-footer-outer,
#tpo-momo-modal {
  font-family: 'SVN-Mont', sans-serif !important;
}

.tpo-button-contact-box,
.tpo-mobile-toggle,
#tpodev-contact-footer-outer,
.tpo-button-contact-box,
.tpo-top,
.tpo-top-bottom {
  z-index: 999999999;
}

.tpo-button-contact-box {
  width: auto;
  height: auto;
  position: fixed;
  display: grid;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tpo-button-contact-toggle {
  display: none !important;
  color: #fff;
  padding: 12px 10px;
  border-radius: 20px;
  writing-mode: vertical-rl;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  justify-content: center;
  align-items: center;
}

.tpo-item {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: .25s;
}

.tpo-item-bottom {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
  overflow: visible;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: .25s;
  border: 2px solid #ffffff;
}

/* Hiệu ứng “tỏa sóng” (PC) cho các nút tròn */
.tpo-item::before,
.tpo-item::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55);
  transform: translate(-50%, -50%) scale(1);
  opacity: .85;
  pointer-events: none;
  animation: tpo-wave 1.6s infinite;
}

.tpo-item::before {
  animation-delay: .8s;
}

@keyframes tpo-wave {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: .85;
  }

  70% {
    transform: translate(-50%, -50%) scale(1.85);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.85);
    opacity: 0;
  }
}

/* Tắt animation nếu user giảm chuyển động */
@media (prefers-reduced-motion: reduce) {

  .tpo-item::before,
  .tpo-item::after {
    display: none !important;
    animation: none !important;
  }
}

.tpo-item img {
  width: 90%;
  height: 90%;
}

.tpo-top img {
  width: 50% !important;
  height: 50% !important;
  animation: jumpUp 1.5s infinite ease-in-out;
}

.tpo-top-bottom img {
  width: 70% !important;
  height: 70% !important;
}

.tpo-top {
  position: fixed;
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  display: none !important;
  /* Hide to prevent layout space */
  height: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  transition: .3s opacity, .3s visibility, .3s transform;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* Định nghĩa chuyển động */
@keyframes jumpUp {

  0%,
  100% {
    transform: translateY(6px);
  }

  50% {
    transform: translateY(-6px);
    /* Di chuyển lên 6px */
  }
}

.tpo-top-bottom,
.tpo-mobile-top {
  display: none !important;
  transition: .3s;
}

.tpo-top-bottom img {
  /* Kích hoạt hiệu ứng */
  animation: jumpUp 1.5s infinite ease-in-out;
}


.tpo-top.show {
  display: flex !important;
  /* Force flex when shown */
  opacity: 1;
  visibility: visible;
  height: auto;
  overflow: visible;
  transform: scale(1.05);
}

.tpo-item+.tpo-top.show {
  margin-top: 12px !important;
}

.tpo-top-bottom.show,
.tpo-mobile-top.show {
  display: flex !important;
  transform: scale(1.05);
}

/* Nút toggle trên mobile */
.tpo-mobile-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0079d3;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99998;
  cursor: pointer;
  display: none;
}

.tpo-mobile-toggle::after {
  content: "≡";
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 6px;
  left: 13px;
  line-height: 1;
}

.tpo-button-contact-box.tpo-hidden {
  display: none;
}

@media (max-width: 480px) {
  .tpo-mobile-toggle {
    display: block;
  }

  .tpo-button-contact-box {
    transform: scale(.78);
    transform-origin: right bottom;
  }
}

/* PC only: ẩn nút nổi trên mobile/tablet */
@media (max-width: 850px) {

  .tpo-button-contact-box,
  .tpo-mobile-toggle {
    display: none !important;
  }

  .tpo-item-bottom {
    display: flex;
  }
}

/* ===== Mobile Horizontal Scroll Bar ===== */
#tpo-mobile-scroll-outer {
  position: fixed;
  bottom: 8px;
  left: 0;
  width: 100%;
  z-index: 999999;
  display: none;
  align-items: center;
  pointer-events: none;
}

.tpo-mobile-scroll-wrap {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 40px 25px 18px 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: none;
  border-radius: 0 60px 60px 0;
  box-shadow: 6px 0 20px rgba(0, 0, 0, 0.12);
  max-width: calc(100% - 115px);
  pointer-events: auto;
  gap: 15px;
}

/* Hide scrollbar but allow scrolling */
.tpo-mobile-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.tpo-mobile-scroll-wrap {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tpo-scroll-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  min-width: 60px;
  flex-shrink: 0;
}

.tpo-scroll-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}

.tpo-scroll-icon img {
  width: 85%;
  height: 85%;
  position: relative;
  z-index: 2;
  object-fit: contain;
}

.tpo-scroll-label {
  font-size: 10px;
  font-weight: 600;
  color: #333;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpodev-contact-footer-btn-label {
  padding: 0px 2px 0 2px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: bold;
  line-height: 1.2;
}

.phone-vr-circle-fill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all .5s;
  pointer-events: none;
}

#tpo-mobile-scroll-outer .tpo-top-bottom {
  width: 48px;
  height: 48px;
  margin-left: auto;
  margin-right: 15px;
  flex-shrink: 0;
  display: none !important;
  /* Hide until scroll */
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  transition: .3s;
}

#tpo-mobile-scroll-outer .tpo-top-bottom.show {
  display: flex !important;
}

@media (max-width: 850px) {
  #tpo-mobile-scroll-outer {
    display: flex;
  }
}

/* Unified Display Scaling */
@media (max-width: 850px) {
  .tpo-is-unified {
    display: flex !important;
    /* Override the hiding logic in PHP-injected CSS if enabled */
    transform: scale(0.85);
    transform-origin: right bottom;
  }
}

/* ===== MoMo QR Popup (Cafe) ===== */
#tpo-momo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
  align-items: center;
  justify-content: center;
}

#tpo-momo-modal.tpo-open {
  display: flex;
}

#tpo-momo-modal .tpo-momo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}

#tpo-momo-modal .tpo-momo-box {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

#tpo-momo-modal .tpo-momo-title {
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 10px;
  text-align: center;
}

#tpo-momo-modal img {
  display: block;
  max-width: 86vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

#tpo-momo-modal .tpo-momo-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 34px;
  background: #f3f3f3;
}