/* Checkout Typeform-style — Oryon Academy */

.tf-body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: #e8ecf4;
  overflow-x: hidden;
}

.tf-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 15% 20%, rgba(87, 34, 247, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 60% at 85% 80%, rgba(139, 111, 242, 0.12), transparent 50%),
    linear-gradient(165deg, #eef1f8 0%, #e4e9f2 45%, #dce3ef 100%);
  pointer-events: none;
}

.tf-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
}

.tf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 28px;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.tf-logo:hover { opacity: 1; }
.tf-logo img { border-radius: 8px; }
.tf-logo strong { font-weight: 700; color: var(--roxo); }

.tf-stage {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tf-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(11, 31, 59, 0.06),
    0 24px 80px rgba(11, 31, 59, 0.12),
    0 8px 24px rgba(11, 31, 59, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: min(88vh, 720px);
  animation: tfCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tfCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tf-progress {
  height: 5px;
  background: var(--g3);
  flex-shrink: 0;
}
.tf-progress-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--roxo), var(--lilas));
  border-radius: 0 2px 2px 0;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.tf-card-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 44px 24px;
  display: flex;
  flex-direction: column;
}

.tf-banner {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 24px;
}
.tf-banner--ok {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #047857;
}
.tf-banner--warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
}

.tf-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tf-panes {
  flex: 1;
  position: relative;
  min-height: 200px;
}

.checkout-pane,
.tf-pane {
  display: none;
  animation: none;
}
.checkout-pane.is-active,
.tf-pane.is-active {
  display: block;
}
.checkout-pane.tf-pane--enter,
.tf-pane.tf-pane--enter {
  animation: tfPaneIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tfPaneIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tf-q-num {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--roxo);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.tf-title {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 10px;
}

.tf-hint {
  font-size: 16px;
  color: var(--cinza);
  margin: 0 0 28px;
  line-height: 1.5;
  max-width: 36em;
}

.tf-field {
  margin-bottom: 22px;
}
.tf-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cinza);
  margin-bottom: 8px;
}
.tf-field input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--g4);
  background: transparent;
  padding: 10px 0 12px;
  font-family: inherit;
  font-size: 18px;
  color: var(--text);
  border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tf-field input:focus {
  outline: none;
  border-bottom-color: var(--roxo);
  box-shadow: 0 2px 0 -1px var(--roxo);
}
.tf-field input::placeholder {
  color: var(--cinza2);
  opacity: 0.7;
}
.tf-field input[readonly] {
  color: var(--cinza);
  cursor: default;
}

.tf-address-grid {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px 16px;
}
.tf-address-grid .tf-field--full { grid-column: 1 / -1; }

.tf-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 8px;
}

.tf-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--g4);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  background: #fff;
}
.tf-choice:hover {
  border-color: rgba(87, 34, 247, 0.35);
  box-shadow: 0 4px 16px rgba(87, 34, 247, 0.08);
}
.tf-choice:has(input:checked) {
  border-color: var(--roxo);
  background: linear-gradient(135deg, rgba(87, 34, 247, 0.06), rgba(139, 111, 242, 0.04));
  box-shadow: 0 4px 20px rgba(87, 34, 247, 0.12);
}
.tf-choice input {
  width: 20px;
  height: 20px;
  margin-top: 0;
  accent-color: var(--roxo);
  flex-shrink: 0;
}
.tf-choice-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--g3);
  border: 1px solid var(--borda);
}
.tf-choice-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tf-choice-thumb--empty {
  background: linear-gradient(135deg, var(--g3), var(--lilas-cl));
}
.tf-choice-body { flex: 1; min-width: 0; }
.tf-choice-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.tf-choice-sub {
  display: block;
  font-size: 13px;
  color: var(--cinza);
  margin-top: 4px;
  line-height: 1.35;
}
.tf-choice-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--roxo);
  white-space: nowrap;
  align-self: center;
}

.tf-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px 18px;
  background: var(--g2);
  border-radius: 14px;
}
.tf-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}
.tf-summary-row span:first-child { color: var(--cinza); font-weight: 500; }
.tf-summary-row span:last-child { font-weight: 600; color: var(--text); }

.tf-coupon {
  margin-bottom: 20px;
}
.tf-coupon label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cinza);
  margin-bottom: 10px;
}
.tf-coupon-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.tf-coupon-row input {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 2px solid var(--g4);
  background: transparent;
  padding: 10px 0;
  font-size: 17px;
  font-family: inherit;
}
.tf-coupon-row input:focus {
  outline: none;
  border-bottom-color: var(--roxo);
}
.tf-coupon-row .btn-ghost {
  border-radius: 100px;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 4px;
}
.tf-coupon-msg,
.checkout-coupon-msg {
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.4;
}
.tf-coupon-msg--ok { color: #059669; }
.tf-coupon-msg--err { color: #dc2626; }

.tf-totals {
  padding: 16px 0 8px;
  border-top: 1px solid var(--g4);
}
.tf-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--cinza);
  margin-bottom: 8px;
}
.tf-total-line--discount { color: #059669; }
.tf-total-line--final {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--g4);
  font-size: 16px;
  color: var(--text);
}
.tf-total-line--final strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--roxo);
}

.tf-card-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 44px 28px;
  border-top: 1px solid var(--g4);
  background: #fafbfd;
}

.tf-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--cinza);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tf-back:hover {
  background: var(--g3);
  color: var(--text);
}
.tf-back[hidden] { display: none; }

.tf-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.tf-err {
  width: 100%;
  text-align: right;
  font-size: 13px;
  color: #dc2626;
  margin: 0;
}
.tf-err[hidden] { display: none; }

.tf-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 120px;
  padding: 14px 28px;
  border: none;
  border-radius: 100px;
  background: var(--roxo);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 8px 28px rgba(87, 34, 247, 0.35);
}
.tf-ok:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(87, 34, 247, 0.45);
  background: #6b3df8;
}
.tf-ok:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.tf-ok[hidden] { display: none; }
.tf-ok svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.tf-ok .spin {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.tf-meta {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cinza2);
  text-align: center;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 4px;
}
.tf-meta-item,
.tf-meta-item a {
  font-size: 14px;
  font-weight: 500;
}
.tf-meta a {
  color: var(--roxo);
  text-decoration: none;
}
.tf-meta a:hover { text-decoration: underline; }
.tf-meta strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.tf-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.3;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.35);
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tf-support-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.45);
  color: #fff;
}
.tf-support-btn svg {
  flex-shrink: 0;
}
.tf-meta-sep { margin: 0 4px; opacity: 0.45; font-size: 14px; font-weight: 500; }

.tf-loading {
  font-size: 15px;
  color: var(--cinza);
  padding: 24px 0;
}

@media (max-width: 600px) {
  .tf-shell {
    padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
      max(28px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  .tf-card { border-radius: 16px; min-height: 380px; max-height: 92vh; }
  .tf-card-body { padding: 22px 18px 14px; }
  .tf-card-footer { padding: 14px 18px 18px; }
  .tf-title { font-size: 1.4rem; }
  .tf-hint { font-size: 15px; margin-bottom: 22px; }
  .tf-address-grid { grid-template-columns: 1fr; }
  .tf-support-btn { max-width: 100%; }
}

/* Página pós-pagamento */
.tf-success-body .tf-shell { justify-content: center; }
.tf-success-card {
  padding: 48px 44px 40px;
  text-align: center;
  align-items: center;
  justify-content: flex-start;
  min-height: auto;
  max-height: none;
  overflow: visible;
  animation: tfCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tf-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  color: #059669;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tf-success-icon svg {
  display: block;
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
}
.tf-success-title {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--text);
}
.tf-success-text {
  font-size: 17px;
  line-height: 1.55;
  color: var(--cinza);
  margin: 0 0 12px;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}
.tf-success-text strong { color: var(--text); font-weight: 600; }
.tf-success-hint {
  font-size: 14px;
  color: var(--cinza2);
  margin: 0 0 28px;
}
.tf-success-btn {
  text-decoration: none;
  display: inline-flex;
}
.tf-success-countdown {
  margin-top: 20px;
  font-size: 13px;
  color: var(--cinza2);
}
@media (max-width: 600px) {
  .tf-success-card { padding: 36px 24px 32px; }
}
