/* =========================================================
   CHECKOUT MODAL — pagamento PIX Asaas
   ========================================================= */

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 13, 36, 0.88);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 280ms ease;
}
.checkout-overlay.is-open {
  display: flex;
  opacity: 1;
}

.checkout-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--navy-elev, #0e1d3f) 0%, var(--navy, #0a1633) 100%);
  border: 1px solid rgba(244, 160, 58, 0.35);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 80px rgba(244, 160, 58, 0.12);
  transform: translateY(20px);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.checkout-overlay.is-open .checkout-modal { transform: none; }

.checkout-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 237, 224, 0.06);
  color: var(--text, #f5ede0);
  border: 1px solid rgba(245, 237, 224, 0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 220ms ease, transform 220ms ease;
}
.checkout-close:hover { background: rgba(244, 160, 58, 0.12); transform: rotate(90deg); }

.checkout-modal__head {
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}
.checkout-modal__head h3 {
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text, #f5ede0);
  margin: 0 0 0.4rem;
}
.checkout-modal__head p {
  font-size: 0.92rem;
  color: var(--text-soft, #b8b0a0);
  margin: 0;
}

.checkout-form { display: grid; gap: 0.85rem; }
.checkout-field {
  display: grid;
  gap: 0.4rem;
}
.checkout-field label {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted, #7a7d92);
  font-weight: 600;
}
.checkout-field input {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(5, 13, 36, 0.7);
  border: 1px solid rgba(245, 237, 224, 0.12);
  border-radius: 8px;
  color: var(--text, #f5ede0);
  outline: none;
  transition: border-color 200ms ease, background 200ms ease;
}
.checkout-field input:focus {
  border-color: var(--sunset, #f4a03a);
  background: rgba(5, 13, 36, 0.95);
}
.checkout-field input::placeholder { color: var(--text-muted, #7a7d92); }

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  margin: 0.5rem 0 1rem;
  background: rgba(244, 160, 58, 0.08);
  border: 1px solid rgba(244, 160, 58, 0.25);
  border-radius: 8px;
}
.checkout-summary__label {
  font-size: 0.85rem;
  color: var(--text-soft, #b8b0a0);
}
.checkout-summary__plan {
  font-weight: 700;
  color: var(--text, #f5ede0);
}
.checkout-summary__amount {
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--gold, #ffd17a), var(--sunset, #f4a03a));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.checkout-submit {
  margin-top: 0.5rem;
  padding: 1.05rem 1.4rem;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--gold, #ffd17a), var(--sunset, #f4a03a), var(--sunset-deep, #c4632e));
  color: #1a0e00;
  cursor: pointer;
  box-shadow: 0 14px 28px -10px rgba(244, 160, 58, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}
.checkout-submit:hover { transform: translateY(-2px); }
.checkout-submit:disabled { opacity: 0.6; cursor: wait; }

.checkout-error {
  display: none;
  padding: 0.7rem 0.9rem;
  background: rgba(199, 52, 54, 0.15);
  border: 1px solid rgba(199, 52, 54, 0.4);
  border-radius: 6px;
  color: #ffb3b3;
  font-size: 0.85rem;
}
.checkout-error.is-visible { display: block; }

/* ===== Bloco de conta (signup inline) ===== */
.checkout-account {
  padding: 1rem 1.1rem 1.1rem;
  background: rgba(244, 160, 58, 0.04);
  border: 1px solid var(--border-sunset, rgba(244, 160, 58, 0.3));
  border-radius: 10px;
  display: grid;
  gap: 0.6rem;
}
.checkout-account__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.checkout-account__title {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sunset, #f4a03a);
  font-weight: 700;
}
.checkout-account__notice {
  font-size: 0.78rem;
  color: var(--text-soft, #c0b8a8);
}
.checkout-account__notice strong { color: var(--text, #f5ede0); }
.checkout-account__notice a {
  color: var(--cobalt-bright, #5b9bff);
  text-decoration: underline;
}
.checkout-account input[readonly] {
  opacity: 0.7;
  cursor: not-allowed;
}

.checkout-divider {
  position: relative;
  text-align: center;
  margin: 0.4rem 0;
}
.checkout-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(245, 237, 224, 0.1);
}
.checkout-divider span {
  position: relative;
  padding: 0 0.7rem;
  background: var(--navy-card, #11244a);
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted, #7a7d92);
}

/* ===== CUPOM ===== */
.checkout-field--coupon { gap: 0.35rem; }
.checkout-coupon-row {
  display: flex;
  gap: 0.5rem;
}
.checkout-coupon-row input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.checkout-coupon-row input:disabled {
  background: rgba(64, 196, 99, 0.08);
  border-color: rgba(64, 196, 99, 0.4);
  color: #5be374;
  cursor: not-allowed;
}
.checkout-coupon-btn {
  padding: 0 1rem;
  background: rgba(244, 160, 58, 0.1);
  border: 1px solid var(--border-sunset, rgba(244, 160, 58, 0.4));
  color: var(--sunset, #f4a03a);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 200ms ease, transform 200ms ease;
}
.checkout-coupon-btn:hover { background: rgba(244, 160, 58, 0.2); transform: translateY(-1px); }
.checkout-coupon-msg {
  font-size: 0.82rem;
  color: var(--text-muted, #7a7d92);
  min-height: 1.1rem;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.02em;
}
.checkout-coupon-msg--ok { color: #5be374; }
.checkout-coupon-msg--err { color: #ff9b9b; }
.checkout-coupon-msg strong { color: var(--gold, #ffd17a); }

.checkout-summary__strike {
  text-decoration: line-through;
  color: var(--text-muted, #7a7d92);
  font-size: 0.7em;
  font-weight: 500;
  margin-right: 0.4rem;
}

/* ===== STEP: AGUARDANDO PAGAMENTO ===== */
.checkout-pix {
  text-align: center;
}
.checkout-pix__amount {
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--gold, #ffd17a), var(--sunset, #f4a03a));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.3rem;
  line-height: 1;
}
.checkout-pix__plan {
  font-size: 0.85rem;
  color: var(--text-soft, #b8b0a0);
  margin-bottom: 1.2rem;
}
.checkout-pix__qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto 1.2rem;
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}
.checkout-pix__qr img { width: 100%; height: 100%; display: block; }

.checkout-pix__copy {
  display: flex;
  align-items: stretch;
  background: rgba(5, 13, 36, 0.7);
  border: 1px solid rgba(245, 237, 224, 0.12);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.checkout-pix__copy code {
  flex: 1;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  padding: 0.7rem 0.85rem;
  color: var(--text-soft, #b8b0a0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.checkout-pix__copy button {
  background: var(--sunset, #f4a03a);
  color: #1a0e00;
  border: none;
  padding: 0 1rem;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease;
}
.checkout-pix__copy button:hover { background: var(--gold, #ffd17a); }

.checkout-pix__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft, #b8b0a0);
  margin-top: 0.5rem;
}
.checkout-pix__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sunset, #f4a03a);
  animation: chkPulse 1.4s ease-in-out infinite;
}
@keyframes chkPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.checkout-pix__hint {
  font-size: 0.8rem;
  color: var(--text-muted, #7a7d92);
  line-height: 1.55;
  margin-top: 0.8rem;
}

/* ===== STEP: SUCESSO ===== */
.checkout-done {
  text-align: center;
}
.checkout-done__icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c4f);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 14px 30px -8px rgba(37, 211, 102, 0.55);
}
.checkout-done h3 {
  font-family: var(--font-display, sans-serif);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  color: var(--text, #f5ede0);
  margin: 0 0 0.4rem;
}
.checkout-done p {
  font-size: 0.92rem;
  color: var(--text-soft, #b8b0a0);
  margin: 0 0 1.3rem;
  line-height: 1.55;
}
.checkout-cred {
  text-align: left;
  padding: 1rem 1.2rem;
  background: rgba(5, 13, 36, 0.7);
  border: 1px solid rgba(244, 160, 58, 0.25);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.checkout-cred__row { margin-bottom: 0.6rem; }
.checkout-cred__row:last-child { margin-bottom: 0; }
.checkout-cred__label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted, #7a7d92);
}
.checkout-cred__value {
  font-family: var(--font-mono, monospace);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold, #ffd17a);
  word-break: break-all;
}
.checkout-cred__sub {
  font-size: 0.95rem;
  color: var(--text, #f5ede0);
}

.checkout-done__note {
  font-size: 0.78rem;
  color: var(--text-muted, #7a7d92);
  margin-top: 0.8rem;
}

/* hide steps not active */
.checkout-step { display: none; }
.checkout-step.is-active { display: block; }

@media (max-width: 540px) {
  .checkout-modal { padding: 1.5rem 1.2rem; }
  .checkout-pix__qr { width: 200px; height: 200px; }
}
