/*
  Cột nút nổi bên phải: lên đầu trang, tổng đài, chatbot AI (widget ngoài, đặt trong layouts/theme.bwt).
  Cả 3 dùng chung --fab-right, --fab-size, --fab-gap để thẳng hàng và cách đều nhau.
*/
:root {
  --fab-right: 20px;
  --fab-bottom: 20px;
  --fab-size: 44px;
  --fab-gap: 12px;
}

.addThis_listSharing {
  position: fixed;
  bottom: calc(var(--fab-bottom) + var(--fab-size) + var(--fab-gap));
  z-index: 999;
  top: auto !important;
  right: var(--fab-right);
  opacity: 0;
  display: none;
}

.backtop {
  top: auto !important;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
  top: auto !important;
  height: var(--fab-size);
  width: var(--fab-size);
  background-color: #fff;
  border: 1px solid #d9e6fa;
  line-height: 36px;
  border-radius: 100%;
  font-size: 30px;
  transition: all 0.3s ease-out 0s;
  transform: translateX(20px);
  opacity: 0;
  visibility: hidden;
  text-align: center;
  color: var(--color-primary) !important;
  box-shadow: 0 4px 12px rgba(5, 76, 174, 0.12);
}

.backtop:hover {
  background-color: #eef4fd;
}

.backtop.show {
  z-index: 999;
  transition: transform 0.3s ease-out 0s;
  transform: translateX(0px);
  opacity: 1;
  visibility: visible;
}
.floating_banner img {
  max-width: 70px;
}
@media (max-width: 576px) {
  .floating_banner img {
    max-width: 60px;
  }
}

.fb_dialog_advanced.fb_customer_chat_bubble_animated_no_badge {
  right: 12px !important;
}
.addThis_listSharing {
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--fab-gap);
}
.addThis_group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fab-gap);
}
.addThis_listing {
  display: flex;
  flex-direction: column;
  gap: var(--fab-gap);
  margin: 0;
  padding: 0;
}
.addThis_listing.dnone {
  display: none;
}
.addThis_listing .addThis_item .addThis_item--icon {
  position: relative;
  display: block;
  text-align: center;
  width: var(--fab-size);
  height: var(--fab-size);
  line-height: var(--fab-size);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.11);
  background-size: auto;
  background-repeat: no-repeat;
  background-position: center;
}
.addThis_listing .addThis_item .addThis_item--icon .tooltip-text {
  position: absolute;
  top: 4px;
  right: 55px;
  z-index: 9;
  height: 32px;
  line-height: 26px;
  padding: 3px 10px;
  width: auto;
  border-radius: 5px;
  font-size: 11px;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 1);
  visibility: hidden;
  opacity: 0;
  -ms-transition: all 200ms linear;
  -webkit-transition: all 200ms linear;
  transition: all 200ms linear;
}
.addThis_listing .addThis_item .addThis_item--icon .tooltip-text:after {
  content: '';
  width: 0;
  height: 0;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0, 0, 0, 1);
  position: absolute;
  left: 100%;
  top: 0;
  bottom: 0;
  margin: auto;
  -ms-transition: all 200ms linear;
  -webkit-transition: all 200ms linear;
  transition: all 200ms linear;
}
.addThis_listing .addThis_item .addThis_item--icon:hover {
  text-decoration: none;
  opacity: 0.9;

  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.15),
    0 4px 15px rgba(0, 0, 0, 0.13);
}
.addThis_listing .addThis_item .addThis_item--icon:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
.actionToolbar_mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 999;
  height: 45px;
  width: 100%;
  border-top: 1px solid #e7e7e7;
  background: #fff;
  padding: 5px 10px;
}
.fb_dialog_content > iframe {
  right: -6px !important;
}
.addThis_item--toggle {
  width: var(--fab-size);
  height: var(--fab-size);
  box-shadow: 0 4px 12px rgba(238, 31, 25, 0.25);
  background: var(--color-primary);
  padding: 4px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.addThis_item--toggle * {
  transition: transform ease 0.3s;
  position: absolute;
}
.addThis_item--toggle:hover {
  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.15),
    0 4px 15px rgba(0, 0, 0, 0.13);
}

.addThis_group:not(.active) .addThis_listing {
  pointer-events: none;
}
.addThis_item--toggle .icon {
  transform: scale(0);
  font-size: 44px;
  left: 0;
}
.addThis_group.active .icon {
  transform: scale(1);
}

.addThis_group.active .addThis_item--toggle img {
  transform: scale(0);
}

/* Nút chatbot AI (widget ngoài, nạp trong layouts/theme.bwt): thẳng hàng với cột nút nổi */
.ai-chatbot-widget {
  right: var(--fab-right) !important;
  bottom: var(--fab-bottom) !important;
}
.ai-chatbot-widget .ai-chatbot-button {
  width: var(--fab-size);
  height: var(--fab-size);
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(5, 76, 174, 0.25);
}
.ai-chatbot-widget .ai-chatbot-close-btn {
  right: 64px;
}
