/* Hide Elementor's own form message (field-level errors stay visible) */
.efmp-ready .elementor-form .elementor-message:not(.elementor-help-inline) {
  display: none !important;
}

.efmp {
  --efmp-brand: #4bbcbe;
  --efmp-color: #4bbcbe;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: inherit;
}
.efmp[hidden] { display: none; }
.efmp[data-type="warning"] { --efmp-color: #d97706; }
.efmp[data-type="error"] { --efmp-color: #dc2626; }

.efmp .efmp__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.efmp .efmp__dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  padding: 32px 28px 24px;
  background: #fff;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.efmp.is-open .efmp__backdrop { opacity: 1; }
.efmp.is-open .efmp__dialog { opacity: 1; transform: none; }

.efmp .efmp__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--efmp-color);
  background: #f3f3f3;
  background: color-mix(in srgb, var(--efmp-color) 12%, #fff);
}
.efmp .efmp__icon svg { width: 28px; height: 28px; }

.efmp .efmp__title {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  color: #151515;
}

.efmp .efmp__text {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.5;
  color: #555;
  white-space: pre-line; /* one line per field error */
}

.efmp .efmp__btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--efmp-brand);
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.efmp .efmp__btn:hover,
.efmp .efmp__btn:focus { background: var(--efmp-brand); color: #fff; opacity: 0.85; }
.efmp .efmp__btn:focus-visible { outline: 2px solid var(--efmp-color); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .efmp .efmp__backdrop,
  .efmp .efmp__dialog { transition: none; }
}

/* Loading state while Elementor submits the form */
.efmp-ready .elementor-form.efmp-loading {
  position: relative;
  pointer-events: none;
}

.efmp-ready .elementor-form .efmp-loader {
  position: absolute;
  inset: -8px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1px);
}

.efmp-ready .elementor-form .efmp-loader__spinner {
  display: block;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  /* white chip keeps the spinner readable on dark or image backgrounds */
  padding: 0;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: #4bbcbe;
  border-radius: 50%;
  box-shadow: 0 0 0 13px #fff, 0 6px 18px rgba(0, 0, 0, 0.18);
  animation: efmp-spin 0.7s linear infinite;
}

@keyframes efmp-spin { to { transform: rotate(360deg); } }
