.float-contact{
  position: fixed;
  right: 14px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.fc-btn{
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  background: #fff;
  text-decoration: none;
}

.fc-btn img{
  width: 26px;
  height: 26px;
}

/* brand colors */
.fc-hotline{ background:#e53935; }
.fc-zalo{ background:#0b66ff; }
.fc-facebook{ background:#1877f2; }

.fc-hotline img,
.fc-zalo img,
.fc-facebook img{
  filter: brightness(0) invert(1);
}

/* tooltip */
.fc-tooltip{
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #e53935;
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.08);
  font-size: 13px;
  line-height: 1.3;
  opacity: 0;
  visibility: hidden;
  transition: .18s ease;
  pointer-events: none;
}

.fc-tooltip::after{
  content:"";
  position:absolute;
  right:-8px;
  top:50%;
  transform:translateY(-50%);
  border-left:8px solid #fff;
  border-top:8px solid transparent;
  border-bottom:8px solid transparent;
}

.fc-btn:hover .fc-tooltip{
  opacity:1;
  visibility:visible;
}

/* mobile safe */
@media(max-width:480px){
  .float-contact{ right:10px; bottom:90px; }
  .fc-tooltip{ min-width:180px; }
}
/* ===== MOBILE FIX: show tooltip on tap ===== */
@media (max-width: 768px){
  /* cho phép click */
  .fc-btn{
    cursor: pointer;
          height: 25px !important;
  }

  /* hiển thị tooltip khi tap */
  .fc-btn:active .fc-tooltip,
  .fc-btn:focus .fc-tooltip,
  .fc-btn:focus-within .fc-tooltip{
    opacity: 1;
    visibility: visible;
  }

  /* tooltip gọn hơn cho mobile */
  .fc-tooltip{
    right: 54px;
    min-width: 160px;
    font-size: 12px;
    padding: 8px 10px;
  }
}
@media (max-width: 480px){
  .fc-tooltip{
    opacity: 1;
    visibility: visible;
  }
}
/* ===== FIX SIZE ON MOBILE (no overflow) ===== */
@media (max-width: 480px){
  .float-contact{
    right: 10px;
    bottom: 90px;
    gap: 8px;
    z-index: 99999;
  }

  /* khóa kích thước nút */
  .float-contact .fc-btn{
    width: 40px !important;
    height: 40px !important;
    min-width: 40px ;
    min-height: 40px !important;
    flex: 0 0 40px;
    border-radius: 50%;
    overflow: hidden;
  }

  /* khóa kích thước icon (chống bị CSS global phóng to) */
  .float-contact .fc-btn img{
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: block;
    object-fit: contain;
  }

  /* tooltip nhỏ lại + không vượt màn hình */
  .float-contact .fc-tooltip{
    right: 48px;
    min-width: 140px;
    max-width: calc(100vw - 80px);
    font-size: 12px;
    padding: 8px 10px;
    white-space: normal;
  }
}
/* ===== HIDE TOOLTIP ON MOBILE ===== */
@media (max-width: 768px){
  .fc-tooltip{
    display: none !important;
  }
}
/* =========================
   FLOAT CONTACT - MOBILE FIX
   (no distortion, always right)
   ========================= */

/* an toàn: đảm bảo container không bị CSS global làm tràn */
.float-contact,
.float-contact *{
  box-sizing: border-box;
}

@media (max-width: 768px){
  /* luôn cố định bên phải */
  .float-contact{
    position: fixed !important;
    right: 12px !important;
    left: auto !important;
    bottom: 90px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 10px !important;

    z-index: 99999 !important;
  }

  /* nút luôn tròn, không méo */
  .float-contact .fc-btn{
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 999px !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;

    text-decoration: none;
  }

  /* icon không méo, không bị phóng to bởi CSS global */
  .float-contact .fc-btn img{
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;

    display: block !important;
    object-fit: contain !important;
  }

  /* tooltip không hiểu thị trên mobile */
  .float-contact .fc-tooltip{
    display: none !important;
  }
}

@media (max-width: 480px){
  .float-contact{
    right: 10px !important;
    bottom: 80px !important;
    gap: 8px !important;
  }

  .float-contact .fc-btn{
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .float-contact .fc-btn img{
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
  }
}


