/* Floating contact — desktop stack + mobile FAB (≤991px) */

.contact-box-bottom--desktop {
  position: fixed;
  bottom: 20px;
  right: 10px;
  /* Below cookie consent (10050) so banner stays tappable */
  z-index: 9990;
  animation: mg-back-in-right 1s both;
}

@media (max-width: 991px) {
  .contact-box-bottom--desktop {
    display: none !important;
  }
}

/* Mobile / tablet FAB */
.contact-fab {
  position: fixed;
  right: 12px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  /* Below cookie consent (10050) so Đồng ý / Từ chối stay tappable on mobile */
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  transition: bottom 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tracks PDP sticky CTA states via --mg-floating-bottom-offset (default = floor) */
html[data-pdp-mobile] .contact-fab {
  bottom: calc(
    var(--mg-floating-bottom-offset, 16px) + env(safe-area-inset-bottom, 0px)
  );
}

.contact-fab__menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.contact-fab--open .contact-fab__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.contact-fab__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(33, 43, 54, 0.14);
  white-space: nowrap;
}

.contact-fab__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.contact-fab__icon--phone {
  width: 20px;
  height: 20px;
  padding: 8px;
  box-sizing: content-box;
  color: #d02915;
}

.contact-fab__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding-right: 4px;
}

.contact-fab__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #d02915;
  color: #fff;
  box-shadow: 0 4px 16px rgba(208, 41, 21, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.contact-fab__toggle:hover {
  background: #b82212;
}

.contact-fab__toggle-icon {
  width: 24px;
  height: 24px;
}

@media (min-width: 992px) {
  .contact-fab {
    display: none !important;
  }
}