/* Modal de inscrição + checkout Mercado Pago */

.insc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 32, 30, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.insc-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.insc-modal {
  width: min(520px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(11, 74, 72, 0.28);
  transform: translateY(12px);
  transition: transform 0.22s ease, width 0.22s ease, max-height 0.22s ease;
}

.insc-modal-overlay.is-checkout .insc-modal {
  width: min(920px, 100%);
  max-height: min(96vh, 900px);
}

.insc-pay-frame-wrap {
  width: 100%;
  min-height: 420px;
  border: 1px solid #DCE1DA;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.insc-pay-frame {
  display: block;
  width: 100%;
  height: min(62vh, 560px);
  border: 0;
  background: #fff;
}

.insc-modal-overlay.is-open .insc-modal {
  transform: translateY(0);
}

.insc-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 12px;
  border-bottom: 1px solid #DCE1DA;
}

.insc-modal-header h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #0B4A48;
  margin: 0 0 4px;
  line-height: 1.25;
}

.insc-modal-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #4C5C58;
}

.insc-modal-close {
  flex: none;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #EDF1F1;
  color: #0B4A48;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.insc-modal-close:hover {
  background: #E4EEEC;
}

.insc-modal-body {
  padding: 18px 24px 24px;
}

.insc-price-banner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: #E4EEEC;
  border-radius: 6px;
}

.insc-price-banner .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1F6E67;
  font-weight: 600;
}

.insc-price-banner .value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0B4A48;
}

.insc-field {
  margin-bottom: 14px;
}

.insc-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #14201E;
  margin-bottom: 5px;
}

.insc-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #DCE1DA;
  border-radius: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  color: #14201E;
  background: #F5F6F2;
}

.insc-field input:focus {
  outline: 2px solid #1F6E67;
  outline-offset: 1px;
  background: #fff;
}

.insc-field .hint {
  font-size: 0.75rem;
  color: #93A6AC;
  margin-top: 4px;
}

.insc-field .hint.is-error {
  color: #B42318;
}

.insc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.insc-field-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #14201E;
  margin-bottom: 5px;
}

@media (max-width: 520px) {
  .insc-field-row {
    grid-template-columns: 1fr;
  }
}

.insc-error {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #FCE8E6;
  color: #8B2E26;
  border-radius: 4px;
  font-size: 0.88rem;
}

.insc-error.is-visible {
  display: block;
}

.insc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.insc-actions .btn {
  cursor: pointer;
  border: none;
}

.insc-actions .btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.insc-step {
  display: none;
}

.insc-step.is-active {
  display: block;
}

.insc-status {
  text-align: center;
  padding: 12px 0 8px;
}

.insc-status h3 {
  font-family: 'Source Serif 4', serif;
  color: #0B4A48;
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.insc-status p {
  margin: 0 0 16px;
  color: #4C5C58;
  font-size: 0.95rem;
}

.insc-wallet-box {
  min-height: 60px;
  margin: 12px 0 8px;
}

.insc-payment-brick {
  min-height: 320px;
  padding: 4px 8px 12px;
  background: #fff;
}

.insc-done-panel {
  padding: 28px 12px 16px;
}

.insc-done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #1F6E67, #0B4A48);
  box-shadow: 0 10px 24px rgba(11, 74, 72, 0.28);
  animation: insc-done-pop 0.45s ease;
}

@keyframes insc-done-pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.insc-pay-cta {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #F5F6F2;
  border: 1px solid #DCE1DA;
  border-radius: 8px;
}

.insc-pay-cta-lead {
  margin: 0;
  font-size: 0.92rem;
  color: #4C5C58;
  line-height: 1.45;
}

.insc-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.insc-pay-cta .btn-ghost {
  width: 100%;
}

.insc-mock-note {
  margin-top: 12px;
  padding: 12px;
  background: #F2E9D9;
  border-radius: 4px;
  font-size: 0.88rem;
  color: #5C4A2E;
}

.insc-mock-note code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
}

@media (max-width: 520px) {
  .insc-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .insc-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 12px 12px 0 0;
  }

  .insc-modal-overlay.is-checkout .insc-modal {
    width: 100%;
    max-height: 96vh;
    border-radius: 12px 12px 0 0;
  }

  .insc-pay-frame {
    height: 55vh;
  }
}
