/**
 * QUICK CONTACT FLOATING WIDGET (Zalo & Hotline)
 * Tối ưu chuyển đổi và kết nối nhanh trên cả PC và Mobile
 */

.tulms-quick-contact {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  pointer-events: none;
}

.tulms-qc-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.tulms-qc-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  position: relative;
  flex-shrink: 0;
}

.tulms-qc-item--phone .tulms-qc-icon {
  background: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  animation: tulmsQcPulsePhone 3s ease-in-out infinite;
}

.tulms-qc-item--zalo .tulms-qc-icon {
  background: #0068ff;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
  animation: tulmsQcPulseZalo 3s ease-in-out infinite 1.5s;
}

.tulms-qc-item:hover .tulms-qc-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.tulms-qc-item:active .tulms-qc-icon {
  transform: scale(0.95);
}

.tulms-qc-zalo-badge {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1;
}

.tulms-qc-label {
  background: #0f172a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  order: -1;
}

.tulms-qc-item:hover .tulms-qc-label {
  opacity: 1;
  transform: translateX(0);
}

@keyframes tulmsQcPulsePhone {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  60% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes tulmsQcPulseZalo {
  0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.5); }
  60% { box-shadow: 0 0 0 14px rgba(0, 104, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); }
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .tulms-quick-contact {
    bottom: 20px;
    right: 16px;
    gap: 10px;
  }
  .tulms-qc-icon {
    width: 44px;
    height: 44px;
  }
  .tulms-qc-icon svg {
    width: 20px;
    height: 20px;
  }
  .tulms-qc-zalo-badge {
    font-size: 13.5px;
  }
  .tulms-qc-label {
    display: none !important;
  }
}

/* Tắt hoàn toàn trên trang bài học và màn hình học tập */
body.tulms-learning-page .tulms-quick-contact {
  display: none !important;
}
