/* Hide Elementor conference popup when custom modal is active */
#elementor-popup-modal-441,
.elementor-popup-modal[data-elementor-id="441"],
div[data-elementor-type="popup"][data-elementor-id="441"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.mosap-conf-overlay {
  position: fixed;
  inset: 0;
  z-index: 999990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 24px;
  background: rgba(15, 23, 42, 0.55);
  box-sizing: border-box;
}

.mosap-conf-overlay.is-open {
  display: flex;
}

.mosap-conf-dialog {
  position: relative;
  width: auto;
  max-width: min(1120px, 94vw);
  height: auto;
  max-height: 90vh;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.mosap-conf-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  padding: 0 0 1px;
  margin: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.mosap-conf-flyer {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  background: #fff;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
}

#mosapConfOverlay .mosap-conf-flyer img {
  position: relative;
  inset: auto;
  display: block;
  width: auto !important;
  height: 100% !important;
  max-width: none !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none;
  box-shadow: none;
  object-fit: contain;
  object-position: center center;
}

.mosap-conf-form-pane {
  flex: 1 1 480px;
  min-width: min(480px, 58vw);
  padding: 20px 24px 14px;
  overflow-y: auto;
  max-height: 90vh;
}

.mosap-conf-form-pane h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #5b1d6e;
  letter-spacing: -0.02em;
}

.mosap-conf-field {
  margin-bottom: 8px;
}

.mosap-conf-field label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.mosap-conf-req {
  color: #b91c1c;
  font-weight: 700;
}

.mosap-conf-field.is-invalid label {
  color: #b91c1c;
}

.mosap-conf-field.is-invalid input,
.mosap-conf-field.is-invalid textarea,
.mosap-conf-field.is-invalid select {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.mosap-conf-field input,
.mosap-conf-field textarea,
.mosap-conf-field select {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d8c7e0;
  border-radius: 8px;
  background: #faf7fc;
  font: inherit;
  font-size: 0.9rem;
  color: #1e293b;
}

.mosap-conf-field input:focus,
.mosap-conf-field textarea:focus,
.mosap-conf-field select:focus {
  outline: none;
  border-color: #74256c;
  box-shadow: 0 0 0 3px rgba(116, 37, 108, 0.15);
  background: #fff;
}

.mosap-conf-child-ages-block {
  margin-top: 2px;
}

.mosap-conf-child-ages-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.mosap-conf-age-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.mosap-conf-age-box label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.mosap-conf-age-box .mosap-conf-age-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d8c7e0;
  border-radius: 8px;
  background: #faf7fc;
  font: inherit;
  font-size: 0.9rem;
  color: #1e293b;
}

.mosap-conf-age-box .mosap-conf-age-input:focus {
  outline: none;
  border-color: #74256c;
  box-shadow: 0 0 0 3px rgba(116, 37, 108, 0.15);
  background: #fff;
}

.mosap-conf-field.is-invalid .mosap-conf-age-input {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.mosap-conf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mosap-conf-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mosap-conf-submit {
  appearance: none;
  border: none;
  border-radius: 999px;
  min-height: 42px;
  flex: 1;
  padding: 9px 20px;
  background: linear-gradient(135deg, #5b1d6e, #74256c);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(88, 28, 88, 0.28);
}

.mosap-conf-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.mosap-conf-skip {
  appearance: none;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px;
}

.mosap-conf-msg {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  display: none;
}

.mosap-conf-msg.is-error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
}

.mosap-conf-msg.is-ok {
  display: block;
  background: #ecfdf5;
  color: #047857;
}

.mosap-conf-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  display: none;
}

.mosap-conf-overlay.is-celebrating .mosap-conf-confetti {
  display: block;
}

.mosap-conf-form-pane.is-success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.mosap-conf-form-pane.is-success #mosapConfTitle,
.mosap-conf-form-pane.is-success #mosapConfMsg,
.mosap-conf-form-pane.is-success #mosapConfForm {
  display: none !important;
}

.mosap-conf-form-pane.is-success .mosap-conf-success {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  justify-content: center;
  align-items: center;
}

.mosap-conf-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 16px;
  animation: mosapConfSuccessIn .45s ease-out;
  box-sizing: border-box;
}

.mosap-conf-success-emoji {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 10px;
  animation: mosapConfPop .55s ease-out;
}

.mosap-conf-success-hello {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  color: #5b1d6e;
  letter-spacing: -0.02em;
}

.mosap-conf-success-sub {
  margin: 0 0 18px;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 28ch;
}

.mosap-conf-success .mosap-conf-submit {
  width: auto;
  min-width: 140px;
  flex: 0 0 auto;
}

@keyframes mosapConfSuccessIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mosapConfPop {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

@media (max-width: 768px) {
  .mosap-conf-overlay {
    padding: 5dvh 10px;
    align-items: center;
  }

  .mosap-conf-dialog {
    flex-direction: column;
    width: min(100%, 520px);
    height: 90dvh;
    max-height: 90dvh;
    min-height: 90dvh;
    overflow: hidden;
  }

  .mosap-conf-close {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 1.35rem;
  }

  .mosap-conf-flyer {
    display: none !important;
  }

  .mosap-conf-form-pane {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    padding: 14px 16px 16px;
  }

  .mosap-conf-form-pane h2 {
    flex: 0 0 auto;
    font-size: 1.2rem;
    margin: 0 0 10px;
    padding-right: 40px;
  }

  #mosapConfForm {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    min-height: 0;
    gap: 2px;
  }

  .mosap-conf-field {
    margin-bottom: 0;
  }

  .mosap-conf-field label {
    margin-bottom: 4px;
    font-size: 0.74rem;
  }

  .mosap-conf-field input,
  .mosap-conf-field textarea,
  .mosap-conf-field select {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.88rem;
    border-radius: 8px;
  }

  .mosap-conf-row {
    gap: 10px;
  }

  .mosap-conf-actions {
    flex: 0 0 auto;
    margin-top: 8px;
  }

  .mosap-conf-submit {
    min-height: 42px;
    padding: 9px 18px;
    font-size: 0.98rem;
  }

  .mosap-conf-msg {
    flex: 0 0 auto;
    margin: 0 0 8px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .mosap-conf-form-pane.is-success {
    justify-content: center;
  }

  .mosap-conf-form-pane.is-success .mosap-conf-success {
    flex: 1 1 auto;
    min-height: 100%;
    justify-content: center;
    padding: 20px 16px;
  }

  .mosap-conf-success {
    flex: 1 1 auto;
    min-height: 0;
  }

  .mosap-conf-success-emoji {
    font-size: 2.6rem;
    margin-bottom: 10px;
  }

  .mosap-conf-success-hello {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .mosap-conf-success-sub {
    font-size: 0.92rem;
    margin-bottom: 16px;
  }
}

@media (max-width: 420px) {
  .mosap-conf-overlay {
    padding: 5dvh 8px;
  }

  .mosap-conf-form-pane {
    padding: 12px 14px 14px;
  }

  .mosap-conf-form-pane h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .mosap-conf-field input,
  .mosap-conf-field textarea,
  .mosap-conf-field select {
    min-height: 34px;
    font-size: 0.84rem;
  }
}
