/* Hiệu ứng bơm phồng gây chú ý cho nút chính */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: none; }
  50% { transform: scale(1.15); box-shadow: 0 0 15px rgba(255,87,34,0.8); }
  100% { transform: scale(1); box-shadow: none; }
}

#tdgm-contact-container {
  position: fixed;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  z-index: 9000;
}

/* SweetAlert2 luôn nằm trên tất cả các nút nổi */
.swal2-container {
  z-index: 99999 !important;
}

/* Gây chú ý hài hòa hơn, giảm kích thước nút chính */
#tdgm-contact-container .tdgm-main-btn {
  margin: 0px !important;
  background-color: #ffc822;
  border: none;
  padding: 10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  animation: pulse 1.5s infinite; /* giảm thời gian để phồng mạnh hơn */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Tắt hiệu ứng khi hover (có thể bỏ hoặc giữ) */
#tdgm-contact-container .tdgm-main-btn:hover {
  animation: none;
}

/* Ban đầu các nút liên hệ ẩn, sẽ chuyển qua trạng thái nổi lên */
#tdgm-contact-container .tdgm-hidden {
  opacity: 0;
  transform: translateY(20px); /* dịch xuống để khi bật lên, trông nổi lên */
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute; /* nổi trên */
  bottom: 70px; /* cách nút chính 70px để tràn lên */
  pointer-events: none; /* không nhận click khi ẩn */
  z-index: 998;
}

/* Khi class 'show' bật, các nút nổi lên và chuyển động mượt */
#tdgm-contact-container.show .tdgm-hidden {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 767px) {
  #tdgm-contact-container.tdgm-mobile-only {
    display: flex !important;
  }
}
@media (min-width: 768px) {
  #tdgm-contact-container.tdgm-mobile-only {
    display: none !important;
  }
}

/* Căn chỉnh contact list theo phía nút */
#tdgm-contact-container.tdgm-side-right {
  align-items: flex-end;
}
#tdgm-contact-container.tdgm-side-left {
  align-items: flex-start;
}

/* Tooltip khi hover icon liên hệ */
.tdgm-contact-btn {
  position: relative;
}
.tdgm-contact-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 12px;
  font-family: sans-serif;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10000;
}
/* Bên phải: tooltip hiện sang trái */
#tdgm-contact-container.tdgm-side-right .tdgm-contact-btn::before {
  right: calc(100% + 10px);
  left: auto;
}
/* Bên trái: tooltip hiện sang phải */
#tdgm-contact-container.tdgm-side-left .tdgm-contact-btn::before {
  left: calc(100% + 10px);
  right: auto;
}
.tdgm-contact-btn:hover::before {
  opacity: 1;
}

/* =============================================
   STYLE 2: Card ngang với gradient màu
   ============================================= */

/* Container Style 2 */
#tdgm-contact-container.tdgm-style2 {
  align-items: flex-end !important;
}
#tdgm-contact-container.tdgm-style2.tdgm-side-left {
  align-items: flex-start !important;
}
#tdgm-contact-container.tdgm-style2.tdgm-side-right {
  align-items: flex-end !important;
}

/* Hidden list style2 */
#tdgm-contact-container.tdgm-style2 .tdgm-hidden {
  bottom: 76px;
  align-items: stretch !important;
  min-width: 280px;
}

/* Tắt tooltip cho style2 */
#tdgm-contact-container.tdgm-style2 .tdgm-contact-btn::before {
  display: none !important;
}

/* === Card button: selector thật cụ thể để chống theme override === */
#tdgm-contact-container.tdgm-style2 .tdgm-card-btn {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: 280px !important;
  min-height: 70px;
  border-radius: 18px !important;
  padding: 12px 16px !important;
  margin-bottom: 10px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  gap: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#tdgm-contact-container.tdgm-style2 .tdgm-card-btn:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28) !important;
}

/* === Icon container bên trái === */
#tdgm-contact-container.tdgm-style2 .tdgm-card-icon {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

/* === Ảnh icon — CRITICAL: chống theme img { max-width: 100% } === */
#tdgm-contact-container.tdgm-style2 .tdgm-card-icon img {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* === Text giữa === */
#tdgm-contact-container.tdgm-style2 .tdgm-card-text {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.3 !important;
  overflow: hidden;
}
#tdgm-contact-container.tdgm-style2 .tdgm-card-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #fff !important;
  letter-spacing: 0.5px;
  text-transform: uppercase !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  white-space: nowrap;
  margin: 0 !important;
  padding: 0 !important;
}
#tdgm-contact-container.tdgm-style2 .tdgm-card-value {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  white-space: nowrap;
  margin: 0 !important;
  padding: 0 !important;
}

/* === Mũi tên phải === */
#tdgm-contact-container.tdgm-style2 .tdgm-card-arrow {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

/* === Gradient màu từng loại === */
#tdgm-contact-container.tdgm-style2 .tdgm-card-hotline {
  background: linear-gradient(135deg, #2ecc71 0%, #1abc9c 100%) !important;
}
#tdgm-contact-container.tdgm-style2 .tdgm-card-zalo {
  background: linear-gradient(135deg, #2979ff 0%, #651fff 100%) !important;
}
#tdgm-contact-container.tdgm-style2 .tdgm-card-messenger {
  background: linear-gradient(135deg, #2979ff 0%, #7c4dff 100%) !important;
}
#tdgm-contact-container.tdgm-style2 .tdgm-card-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
}