/* Checkout Widget — modal + form (Amante dos Fios Onda 2) */

.am-modal { position: fixed; inset: 0; z-index: 9999; }
.am-backdrop {
  position: absolute; inset: 0;
  background: rgba(45, 24, 16, 0.65);
  backdrop-filter: blur(4px);
}
.am-dialog {
  position: relative;
  max-width: 540px;
  margin: 40px auto;
  background: #fff;
  border-radius: 24px;
  padding: 30px 30px 34px;
  box-shadow: 0 30px 80px rgba(45,24,16,0.45);
  border: 2px solid #E8B852;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #3A2A23;
}
.am-close {
  position: absolute; top: 14px; right: 18px;
  background: transparent; border: 0;
  font-size: 32px; line-height: 1;
  color: #7A6359; cursor: pointer;
  font-weight: 300;
}
.am-close:hover { color: #5B3427; }

.am-head { text-align: center; margin-bottom: 24px; }
.am-badge {
  display: inline-block;
  background: linear-gradient(135deg, #B97770, #5B3427);
  color: #F4D58F;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.16em;
  border: 1.5px solid #E8B852;
  margin-bottom: 14px;
}
.am-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: #3A1F15;
  font-style: italic;
  margin: 0 0 6px;
}
.am-head h2 em { color: #B97770; }
.am-head p { color: #7A6359; font-size: 0.94rem; line-height: 1.55; margin: 0; }

.am-curso-label {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #7A6359;
  margin: 16px 0 10px;
}

.am-cursos { margin-bottom: 18px; }
.am-curso-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #E7D2AE;
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.18s;
  background: #fff;
}
.am-curso-card:hover { border-color: #B97770; background: #FBF6F0; }
.am-curso-card input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: #B97770;
  cursor: pointer;
}
.am-curso-card input[type=checkbox]:checked ~ .am-curso-check {
  background: #6B8E5A; color: #fff;
}
.am-curso-card:has(input:checked) {
  border-color: #B97770;
  background: linear-gradient(135deg, #FBF6F0, #F2DAD5);
}
.am-curso-info { flex: 1; }
.am-curso-titulo { font-weight: 700; font-size: 0.98rem; color: #3A1F15; }
.am-curso-preco { font-size: 0.84rem; color: #7A6359; }
.am-curso-check {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #E7D2AE;
  color: transparent;
  display: grid; place-items: center;
  font-weight: 900;
  transition: all 0.18s;
}

.am-resumo {
  background: #FBF6F0;
  border: 1.5px dashed #B97770;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.am-resumo-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0;
  font-size: 0.92rem;
  color: #5B3427;
}
.am-resumo-total {
  border-top: 1px solid #E7D2AE;
  margin-top: 6px; padding-top: 8px;
  font-size: 1.05rem;
}
.am-resumo-total strong { color: #3A1F15; font-size: 1.2rem; }
.am-resumo-economia {
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(107, 142, 90, 0.12);
  color: #4F6A40;
  border-radius: 8px;
  font-size: 0.82rem;
  text-align: center;
  display: none;
}

.am-bonus {
  background: linear-gradient(90deg, rgba(232,184,82,0.12), rgba(232,184,82,0.04));
  border: 1px dashed #E8B852;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: #5B3427;
  text-align: center;
}
.am-bonus strong { color: #B97770; }

.am-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #E7D2AE;
  border-radius: 12px;
  font-size: 0.96rem;
  font-family: inherit;
  margin-bottom: 10px;
  background: #FBF6F0;
  color: #3A2A23;
  transition: border-color 0.18s;
}
.am-form input:focus {
  outline: none;
  border-color: #B97770;
  background: #fff;
}
.am-form-help { font-size: 0.78rem; color: #7A6359; font-style: italic; margin: 4px 0 0; }

.am-btn-cta {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 17px 22px;
  background: linear-gradient(180deg, #E8B852, #B68C52);
  color: #3A1F15;
  border: 0;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 800; font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 0 #8B6A2E, 0 14px 30px rgba(232,184,82,0.40);
  transition: all 0.18s;
}
.am-btn-cta:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #8B6A2E, 0 10px 22px rgba(232,184,82,0.35);
}
.am-btn-cta:disabled {
  opacity: 0.5; cursor: not-allowed;
  box-shadow: 0 6px 0 #8B6A2E;
}
.am-secure {
  text-align: center; font-size: 0.78rem; color: #7A6359;
  margin: 10px 0 0; font-style: italic;
}

/* Loader */
.am-loader { padding: 60px 30px; text-align: center; }
.am-spinner {
  width: 48px; height: 48px;
  border: 4px solid #FBF6F0;
  border-top-color: #B97770;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.am-loader p { color: #7A6359; font-style: italic; }

/* Stripe mount */
#am-stripe-mount { min-height: 500px; padding: 6px 0; }

@media (max-width: 600px) {
  .am-dialog { margin: 20px 12px; padding: 24px 20px; border-radius: 18px; max-height: calc(100vh - 40px); }
  .am-head h2 { font-size: 1.6rem; }
}
