/* ══ MOONFLAG POPUP v7 — alta especificidade para ganhar do Elementor ══ */

/* Overlay */
body .mfpopup-overlay,
html body .mfpopup-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(5,0,18,.75) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 999998 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Wrap */
html body .mfpopup-overlay .mfpopup-wrap {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  max-width: 820px !important;
  min-height: 460px !important;
  border-radius: 22px !important;
  overflow: visible !important;
  box-shadow: 0 40px 100px rgba(0,0,0,.45) !important;
  animation: mfPopIn .38s cubic-bezier(.34,1.35,.64,1) !important;
  flex-shrink: 0 !important;
  margin: 0 auto !important;
}
@keyframes mfPopIn {
  from { opacity:0; transform:scale(.88) translateY(20px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* Botão fechar */
html body .mfpopup-overlay .mfpopup-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 999999 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,.50) !important;
  border: 2px solid rgba(255,255,255,.45) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-family: sans-serif !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .15s, transform .15s !important;
  pointer-events: all !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
html body .mfpopup-overlay .mfpopup-close:hover {
  background: rgba(0,0,0,.80) !important;
  transform: scale(1.1) !important;
}

/* SVG e imagem decorativa */
html body .mfpopup-overlay .mfpopup-deco,
html body .mfpopup-overlay .mfpopup-side-img { pointer-events: none !important; }

/* Painel esquerdo */
html body .mfpopup-overlay .mfpopup-left {
  flex: 0 0 42% !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 460px !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 22px 0 0 22px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body .mfpopup-overlay .mfpopup-logo {
  position: absolute !important;
  top: 22px !important; left: 22px !important;
  height: 28px !important; width: auto !important;
  object-fit: contain !important;
  z-index: 2 !important;
  pointer-events: none !important;
  display: block !important;
}
html body .mfpopup-overlay .mfpopup-deco {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
html body .mfpopup-overlay .mfpopup-side-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  z-index: 3 !important;
}

/* Painel direito */
html body .mfpopup-overlay .mfpopup-right {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 48px 44px !important;
  overflow-y: auto !important;
  border-radius: 0 22px 22px 0 !important;
  margin: 0 !important;
}
html body .mfpopup-overlay .mfpopup-right-title {
  margin: 0 0 10px !important;
  line-height: 1.2 !important;
  padding: 0 !important;
}
html body .mfpopup-overlay .mfpopup-right-sub {
  margin: 0 0 26px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  padding: 0 !important;
}

/* Formulário */
html body .mfpopup-overlay .mfpopup-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body .mfpopup-overlay .mfpopup-field-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}
html body .mfpopup-overlay .mfpopup-field { width: 100% !important; margin: 0 !important; padding: 0 !important; }

html body .mfpopup-overlay .mfpopup-input {
  width: 100% !important;
  border-width: 1.5px !important;
  border-style: solid !important;
  padding: 11px 15px !important;
  font-size: 14px !important;
  font-family: 'Sora', sans-serif !important;
  box-sizing: border-box !important;
  display: block !important;
  outline: none !important;
  border-radius: 8px !important;
  margin: 0 !important;
  box-shadow: none !important;
  transition: border-color .2s, box-shadow .2s !important;
}
html body .mfpopup-overlay .mfpopup-input:focus {
  border-color: #6f32ff !important;
  box-shadow: 0 0 0 3px rgba(111,50,255,.1) !important;
  outline: none !important;
}

/* Botão form */
html body .mfpopup-overlay .mfpopup-btn {
  width: 100% !important;
  padding: 13px 22px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer !important;
  letter-spacing: .02em !important;
  font-family: 'Sora', sans-serif !important;
  border-radius: 9px !important;
  margin-top: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: filter .2s, transform .17s !important;
}
html body .mfpopup-overlay .mfpopup-btn:hover { filter: brightness(1.08) !important; transform: translateY(-1px) !important; }
html body .mfpopup-overlay .mfpopup-btn:disabled { opacity: .55 !important; cursor: not-allowed !important; transform: none !important; }

/* Mensagem form */
html body .mfpopup-overlay .mfpopup-form-msg {
  font-family: 'Sora', sans-serif !important;
  font-size: 13px !important;
  text-align: center !important;
  min-height: 18px !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
}
html body .mfpopup-overlay .mfpopup-form-msg.success { color: #16a34a !important; }
html body .mfpopup-overlay .mfpopup-form-msg.error   { color: #dc2626 !important; }

/* Botão CTA */
html body .mfpopup-overlay .mfpopup-cta-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 8px !important;
  width: 100% !important;
}
html body .mfpopup-overlay .mfpopup-cta-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  font-family: 'Sora', sans-serif !important;
  letter-spacing: .02em !important;
  width: 100% !important;
  text-align: center !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
  transition: filter .2s, transform .17s !important;
}
html body .mfpopup-overlay .mfpopup-cta-btn:hover { filter: brightness(1.08) !important; transform: translateY(-1px) !important; text-decoration: none !important; }
html body .mfpopup-overlay .mfpopup-cta-btn:visited { text-decoration: none !important; }

/* Tablet */
@media (max-width: 700px) {
  html body .mfpopup-overlay { padding: 12px !important; }
  html body .mfpopup-overlay .mfpopup-wrap { max-width: 480px !important; border-radius: 18px !important; flex-direction: column !important; min-height: auto !important; }
  html body .mfpopup-overlay .mfpopup-left { display: none !important; }
  html body .mfpopup-overlay .mfpopup-right { flex: none !important; padding: 48px 26px 34px !important; border-radius: 18px !important; justify-content: flex-start !important; }
}

/* Mobile */
@media (max-width: 480px) {
  html body .mfpopup-overlay { padding: 0 !important; align-items: flex-end !important; }
  html body .mfpopup-overlay .mfpopup-wrap { max-width: 100% !important; width: 100% !important; border-radius: 20px 20px 0 0 !important; flex-direction: column !important; max-height: 93vh !important; overflow-y: auto !important; }
  html body .mfpopup-overlay .mfpopup-left { display: none !important; }
  html body .mfpopup-overlay .mfpopup-right { flex: none !important; padding: 56px 20px 30px !important; border-radius: 20px 20px 0 0 !important; justify-content: flex-start !important; }
  html body .mfpopup-overlay .mfpopup-field-row { grid-template-columns: 1fr !important; }
  html body .mfpopup-overlay .mfpopup-input { font-size: 16px !important; }
  html body .mfpopup-overlay .mfpopup-close { top: 0 !important; right: 0 !important; height: auto !important; padding: 18px !important; border-radius: 0 20px 0 12px !important; width: auto !important; }
}
