/* WhatsApp Float Button - High specificity to override Elementor */
body .wfb-whatsapp-button,
html body .wfb-whatsapp-button {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  background-color: transparent !important;
  color: white !important;
  border: none !important;
  cursor: pointer !important;
  z-index: 999999999 !important;
  transition: opacity 0.2s ease !important;
  border-radius: 50% !important;
}

body .wfb-whatsapp-button:hover,
html body .wfb-whatsapp-button:hover {
  opacity: 0.8 !important;
}

/* Modal Base - Maximum specificity to override Elementor */
body .wfb-modal,
html body .wfb-modal {
  display: none;
  position: fixed !important;
  z-index: 999999999 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: auto !important;
  background-color: var(--wfb-whatsapp-plugin-overlay-color, rgba(0, 0, 0, 0.5)) !important;
}

/* Modal visible state - ensure it shows when opened */
body .wfb-modal[style*="display: block"],
html body .wfb-modal[style*="display: block"] {
  display: block !important;
}

/* Modal Content - Maximum specificity */
body .wfb-modal-content,
html body .wfb-modal-content,
body .wfb-modal .wfb-modal-content {
  background: var(--wfb-whatsapp-plugin-modal-bg-color, #ffffff) !important;
  color: var(--wfb-whatsapp-plugin-modal-text-color, #333333) !important;
  margin: 8% auto !important;
  padding: 24px !important;
  border: none !important;
  border-radius: var(--wfb-whatsapp-plugin-modal-border-radius, 8px) !important;
  width: 90% !important;
  max-width: 400px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  position: relative !important;
  animation: wfbModalFadeIn 0.3s ease-out !important;
  z-index: 999999999 !important;
}

/* Close Button - High specificity */
body .wfb-modal .wfb-close,
html body .wfb-modal-content .wfb-close {
  color: var(--wfb-whatsapp-plugin-modal-text-color, #333333) !important;
  position: absolute !important;
  top: 12px !important;
  right: 16px !important;
  font-size: 24px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease !important;
  line-height: 1 !important;
  background: none !important;
  border: none !important;
  text-decoration: none !important;
}

body .wfb-modal .wfb-close:hover,
body .wfb-modal .wfb-close:focus,
html body .wfb-modal-content .wfb-close:hover,
html body .wfb-modal-content .wfb-close:focus {
  opacity: 0.7 !important;
}

/* Form Elements - High specificity to override Elementor */
body .wfb-modal .input,
html body .wfb-modal-content .input,
body .wfb-modal-content input.input {
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid var(--wfb-whatsapp-plugin-input-border-color, #dee2e6) !important;
  border-radius: var(--wfb-whatsapp-plugin-input-border-radius, 4px) !important;
  background: var(--wfb-whatsapp-plugin-input-bg-color, #f8f9fa) !important;
  color: var(--wfb-whatsapp-plugin-input-text-color, #495057) !important;
  font-size: 14px !important;
  margin-bottom: 12px !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

body .wfb-modal .input:focus,
html body .wfb-modal-content .input:focus,
body .wfb-modal-content input.input:focus {
  outline: none !important;
  border-color: var(--wfb-whatsapp-plugin-input-border-color, #dee2e6) !important;
  opacity: 0.8 !important;
  box-shadow: none !important;
}

body .wfb-modal .input::placeholder,
html body .wfb-modal-content .input::placeholder,
body .wfb-modal-content input.input::placeholder {
  color: var(--wfb-whatsapp-plugin-input-placeholder-color, #6c757d) !important;
}

body .wfb-modal .label,
html body .wfb-modal-content .label,
body .wfb-modal-content label.label {
  display: block !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  font-size: 14px !important;
  color: var(--wfb-whatsapp-plugin-modal-text-color, #333333) !important;
}

/* Icon - High specificity */
body .wfb-modal .icon,
html body .wfb-modal-content .icon {
  text-align: center !important;
  margin-bottom: 16px !important;
}

body .wfb-modal .icon img,
html body .wfb-modal-content .icon img {
  border-radius: 50% !important;
}

/* Modal Text - High specificity */
body .wfb-modal-content p,
html body .wfb-modal .wfb-modal-content p {
  text-align: center !important;
  margin-bottom: 20px !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--wfb-whatsapp-plugin-modal-text-color, #333333) !important;
}

/* Submit Button - High specificity to override Elementor */
body .wfb-modal .startButton,
html body .wfb-modal-content .startButton,
body .wfb-modal-content button.startButton {
  width: 100% !important;
  padding: 12px 24px !important;
  background: var(--wfb-whatsapp-plugin-button-bg-color, #25D366) !important;
  border: 1px solid var(--wfb-whatsapp-plugin-button-border-color, #25D366) !important;
  border-radius: var(--wfb-whatsapp-plugin-button-border-radius, 4px) !important;
  color: var(--wfb-whatsapp-plugin-button-text-color, #ffffff) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-top: 12px !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  text-align: center !important;
}

body .wfb-modal .startButton:hover,
html body .wfb-modal-content .startButton:hover,
body .wfb-modal-content button.startButton:hover {
  background: var(--wfb-whatsapp-plugin-button-hover-bg-color, #128C7E) !important;
}

body .wfb-modal .startButton:active,
html body .wfb-modal-content .startButton:active,
body .wfb-modal-content button.startButton:active {
  opacity: 0.9 !important;
}

/* Animations */
@keyframes wfbModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wfbModalSlideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wfbModalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wfbModalBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes - High specificity */
body .wfb-modal .wfb-modal-content.fadeIn,
html body .wfb-modal-content.fadeIn {
  animation: wfbModalFadeIn 0.3s ease-out !important;
}

body .wfb-modal .wfb-modal-content.slideDown,
html body .wfb-modal-content.slideDown {
  animation: wfbModalSlideDown 0.3s ease-out !important;
}

body .wfb-modal .wfb-modal-content.scaleIn,
html body .wfb-modal-content.scaleIn {
  animation: wfbModalScaleIn 0.3s ease-out !important;
}

body .wfb-modal .wfb-modal-content.bounceIn,
html body .wfb-modal-content.bounceIn {
  animation: wfbModalBounceIn 0.4s ease-out !important;
}

/* Responsive Design - High specificity */
@media (max-width: 768px) {
  body .wfb-modal-content,
  html body .wfb-modal .wfb-modal-content {
    margin: 5% auto !important;
    width: 95% !important;
    max-width: none !important;
  }
  
  body .wfb-modal .input,
  html body .wfb-modal-content .input,
  body .wfb-modal-content input.input {
    padding: 10px 14px !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
  }
}