/* =============================================
   WAF - FLOATING CONTACT SYSTEM
============================================= */
.waf-floating-contact-system {
  position: fixed;
  bottom: 30px !important;
  right: 30px !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 15px !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: 'Inter', sans-serif;
}

/* Tamanhos configuráveis pelo admin */
.waf-floating-contact-system.waf-size-extra-small .waf-float-btn {
  width: 44px !important;
  height: 44px !important;
  font-size: 1.2rem !important;
}
.waf-floating-contact-system.waf-size-small .waf-float-btn {
  width: 52px !important;
  height: 52px !important;
  font-size: 1.4rem !important;
}
.waf-floating-contact-system.waf-size-medium .waf-float-btn {
  width: 60px !important;
  height: 60px !important;
  font-size: 1.6rem !important;
}
.waf-floating-contact-system.waf-size-large .waf-float-btn {
  width: 70px !important;
  height: 70px !important;
  font-size: 1.8rem !important;
}
.waf-floating-contact-system.waf-size-extra-large .waf-float-btn {
  width: 80px !important;
  height: 80px !important;
  font-size: 2rem !important;
}

/* Floating Buttons */
.waf-float-btn {
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 0 0 2px #fff, 0 15px 35px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: none !important;
  text-decoration: none !important;
  margin: 0 !important;
}
.waf-float-btn:hover {
  transform: scale(1.1) translateY(-5px);
  color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 25px 50px rgba(0,0,0,0.5);
}
.waf-float-btn i { font-size: inherit !important; margin: 0 !important; }

@keyframes wafPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.waf-wpp-float, .waf-wpp-float:hover, .waf-wpp-float:focus {
  background-color: #25D366 !important;
  order: 1;
  animation: wafPulse 2s infinite;
}
.waf-form-float, .waf-form-float:hover, .waf-form-float:focus {
  background-color: #F5820D !important;
  order: 2;
}

/* Form Widget */
.waf-contact-form-widget {
  position: absolute;
  bottom: calc(100% + 20px);
  right: 0;
  width: 350px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: bottom right;
  display: flex;
  flex-direction: column;
}
.waf-contact-form-widget.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.waf-widget-header {
  background: #F5820D;
  padding: 20px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.waf-widget-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.waf-widget-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #fff;
}

.waf-widget-body {
  padding: 20px;
  background: #f9f9f9;
}
.waf-widget-body p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.4;
}

.waf-widget-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.waf-widget-form input, .waf-widget-form textarea {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #333;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-sizing: border-box;
}
.waf-widget-form input:focus, .waf-widget-form textarea:focus {
  border-color: #F5820D;
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 130, 13, 0.2);
}
.waf-widget-form textarea { height: 80px; resize: none; }

.waf-widget-submit {
  width: 100% !important;
  padding: 14px !important;
  background: #F5820D !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
  margin-top: 5px !important;
  box-shadow: none !important;
}
.waf-widget-submit:hover {
  filter: brightness(1.1) !important;
}

/* =============================================
   WPP LEAD CAPTURE MODAL
============================================= */
.waf-wpp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}
.waf-wpp-modal-overlay.active { opacity: 1; visibility: visible; }

.waf-wpp-modal {
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  z-index: 9999;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  transform-origin: bottom right;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}
.waf-wpp-modal.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.waf-wpp-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #111B21;
  color: #fff;
}
.waf-wpp-modal-icon {
  width: 40px;
  height: 40px;
  background: #25D366;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.waf-wpp-modal-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 2px 0;
}
.waf-wpp-modal-header p {
  font-size: 0.8rem;
  color: #aaa;
  margin: 0;
}
.waf-wpp-modal-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
}

.waf-wpp-modal-form {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f0f2f5;
}
.waf-wpp-field-group input {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #333;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.waf-wpp-field-group input:focus {
  border-color: #25D366;
  outline: none;
}
.waf-wpp-field-group input.waf-invalid { border-color: #ff4757; }

.waf-wpp-modal-submit {
  width: 100% !important;
  padding: 12px !important;
  background: #25D366 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 5px !important;
  box-shadow: none !important;
}
.waf-wpp-modal-submit i {
  color: #fff !important;
}
.waf-wpp-modal-skip {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  color: #666 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  text-align: center !important;
  margin-top: 5px !important;
  padding: 8px !important;
  box-shadow: none !important;
}

.waf-lgpd-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.waf-lgpd-label input { margin-top: 3px; }
.waf-lgpd-label span { font-size: 0.8rem; color: #666; }

@keyframes wafShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}
.waf-shake { animation: wafShake 0.4s ease; }

/* Mobile Adaptations */
@media (max-width: 480px) {
  .waf-floating-contact-system { right: 15px !important; bottom: 15px !important; }
  .waf-wpp-modal, .waf-contact-form-widget {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 80px;
    transform-origin: bottom center;
  }
}
