/* ==========================================================================
   FLOATING CONTACT POPUP WIDGET
   ========================================================================== */

/* Outer Floating Container Fixed to Bottom Right */
.custom-contact-popup-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: inherit;
}

/* Floating Action Trigger Button (Brand Pink) */
.custom-contact-trigger-btn {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: #e5456d;
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 20px rgba(229, 69, 109, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
}

.custom-contact-trigger-btn:hover {
  background-color: #d0355c;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(229, 69, 109, 0.45);
}

.custom-contact-trigger-btn .close-icon-svg {
  display: none;
}

.custom-contact-trigger-btn.active .chat-icon-svg {
  display: none;
}

.custom-contact-trigger-btn.active .close-icon-svg {
  display: block;
}

/* Greeting / Info Tooltip Card Above Widget */
.contact-tooltip-card {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 290px;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f1f6;
  box-sizing: border-box;
  animation: floatTooltipIn 0.3s ease-out forwards;
}

@keyframes floatTooltipIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tooltip-title {
  font-weight: 700;
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 6px;
}

.tooltip-message {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.45;
}

/* Visible Close/Dismiss Button for Tooltip Card – SINGLE CLEAN RULE */
.tooltip-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 2;
}

.tooltip-close-btn svg {
  display: block;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.tooltip-close-btn:hover {
  background: #cbd5e1 !important;
  transform: scale(1.1);
}

/* Contact Options Modal Popup */
.custom-contact-popup-modal {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 260px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
}

.custom-contact-popup-modal.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.contact-popup-header {
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.contact-popup-header .header-title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.contact-popup-header .header-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.contact-popup-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

/* Action Buttons (WhatsApp & Messenger) */
.popupLinkBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.popupLinkBtn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Official Colors */
.popupLinkBtn.whatsapp-btn {
  background-color: #25d366;
}

.popupLinkBtn.messenger-btn {
  background-color: #0084ff;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .custom-contact-popup-wrapper {
    bottom: 16px;
    right: 16px;
  }

  .contact-tooltip-card {
    width: calc(100vw - 32px);
    right: 0;
  }
}
