html:has(dialog[open]) {
  overflow: hidden;
}
.checkout-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: 92dvh;
  border: 0;
  border-radius: 20px;
  padding: 30px;
  color: var(--text);
  box-shadow: 0 24px 80px #08244130;
}
.checkout-dialog::backdrop {
  background: #082441ba;
  backdrop-filter: blur(5px);
}
.checkout-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.checkout-top > span {
  font: 700 10px var(--heading);
  letter-spacing: 0.14em;
  color: var(--blue);
}
.checkout-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 22px;
  background: #f1f7fc;
  border-radius: 12px;
  margin-bottom: 25px;
}
.checkout-summary p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.checkout-summary h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.04em;
  outline: 0;
}
.checkout-summary > div:last-child {
  text-align: right;
  flex-shrink: 0;
}
.checkout-summary strong {
  display: block;
  font: 750 24px var(--heading);
  letter-spacing: -0.04em;
  color: var(--navy);
}
.checkout-summary span {
  font-size: 10px;
  color: var(--muted);
}
.checkout-steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  padding: 0 0 22px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.checkout-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.checkout-steps li > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9eff4;
}
.checkout-steps [aria-current] {
  font-weight: 700;
  color: var(--blue);
}
.checkout-steps [aria-current] > span {
  background: var(--blue);
  color: #fff;
}
.checkout-choice h3,
.checkout-form h3,
.checkout-result h3,
.checkout-empty h3 {
  font-size: 21px;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}
.checkout-intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.checkout-methods {
  display: grid;
  gap: 11px;
  margin: 22px 0;
}
.checkout-methods button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  border: 1px solid #d7e3ed;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.checkout-methods button:hover {
  border-color: #9fbfe0;
}
.checkout-methods button[aria-pressed="true"] {
  border-color: var(--blue);
  background: #f2f7ff;
  box-shadow: 0 0 0 1px var(--blue);
}
.checkout-methods button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.checkout-methods strong {
  display: block;
  font: 700 14px var(--heading);
}
.checkout-methods small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.checkout-methods em {
  font-style: normal;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #087657;
  background: #e5f8f1;
  border-radius: 999px;
  padding: 6px 9px;
  white-space: nowrap;
}
.checkout-methods [aria-pressed="true"] .quiz-radio {
  background: var(--blue);
  color: #fff;
}
.checkout-methods button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f8fafc;
}
.checkout-fine {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
  margin: 18px 0;
}
.checkout-choice > .button,
.checkout-submit {
  width: 100%;
}
.checkout-choice > .quiz-back,
.checkout-form > .quiz-back {
  display: block;
  margin: 8px auto;
}
.checkout-status {
  min-height: 200px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.loading-dot {
  width: 15px;
  height: 15px;
  border: 2px solid #d1e5fb;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.checkout-error {
  background: #fff3ed;
  border: 1px solid #f0c9b7;
  color: #8a3417;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.65;
  border-radius: 9px;
  margin: 0 0 20px;
}
.checkout-preview {
  background: #edf8ff;
  border: 1px solid #c7e7fa;
  color: #185978;
  padding: 10px 13px;
  font-size: 11px;
  line-height: 1.55;
  border-radius: 9px;
  margin: -8px 0 18px;
}
.checkout-empty {
  padding: 10px 0;
  text-align: center;
}
.checkout-empty p,
.checkout-result > p,
.checkout-form > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.checkout-empty > .button {
  margin: 12px 0;
}
.checkout-empty > .quiz-back {
  display: block;
  margin: 0 auto;
}
.checkout-field {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 17px;
}
.checkout-field input {
  display: block;
  width: 100%;
  border: 1px solid #b8cbdc;
  background: #fff;
  border-radius: 8px;
  padding: 13px 12px;
  min-height: 48px;
  margin-top: 7px;
  font: 400 16px var(--font);
  color: var(--navy);
}
.checkout-field input:focus,
.pix-box textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.checkout-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.card-fields {
  padding: 0;
  border: 0;
  margin: 0;
}
.checkout-payment-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 22px;
}
.checkout-payment-heading > span {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #eaf4fc;
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: none;
}
.checkout-payment-heading h3 {
  margin: 1px 0 4px;
}
.checkout-payment-heading p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.checkout-review {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  margin: 10px 0 20px;
  font-size: 13px;
}
.checkout-review > div {
  display: grid;
  gap: 4px;
}
.checkout-review small {
  font-size: 10px;
  color: var(--muted);
}
.checkout-review > span {
  text-align: right;
  font-weight: 700;
  color: var(--navy);
}
.checkout-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  margin: 18px 0 23px;
}
.checkout-consent input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.checkout-consent a {
  text-decoration: underline;
  color: var(--blue);
}
.checkout-result {
  text-align: center;
  padding: 10px 0;
}
.result-symbol {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: #eef4fa;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin: 0 auto 20px;
}
.result-symbol.approved {
  background: #e7f4ed;
  color: #167542;
}
.result-symbol.rejected {
  background: #fff0e7;
  color: #a34413;
}
.checkout-result > .text-link {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}
.checkout-result .order-ref {
  font-size: 11px;
}
.checkout-bank-link {
  width: 100%;
  margin: 8px 0 18px;
}
.pix-box {
  background: #f5f9fc;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.pix-box img {
  margin: 0 auto 20px;
  max-width: 100%;
  height: auto;
}
.pix-box label {
  display: block;
  text-align: left;
  font-size: 12px;
}
.pix-box textarea {
  display: block;
  resize: none;
  width: 100%;
  min-height: 82px;
  padding: 10px;
  margin: 7px 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: 12px monospace;
  overflow-wrap: anywhere;
}
.pix-box small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.plan-card .button {
  justify-content: center;
}
.quiz-close:disabled {
  opacity: 0.4;
  cursor: wait;
}
@media (max-width: 600px) {
  .checkout-dialog {
    padding: 22px 20px;
    border-radius: 16px;
  }
  .checkout-summary {
    padding: 16px;
    gap: 14px;
    align-items: flex-start;
    flex-direction: column;
  }
  .checkout-summary > div:last-child {
    text-align: left;
  }
  .checkout-summary h2 {
    font-size: 23px;
  }
  .checkout-summary strong {
    font-size: 24px;
  }
  .checkout-steps {
    gap: 8px;
  }
  .checkout-steps li {
    font-size: 10px;
    gap: 5px;
  }
  .checkout-fields-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .checkout-methods button {
    padding: 15px 13px;
  }
  .checkout-methods em {
    font-size: 8px;
    padding: 5px 7px;
  }
  .checkout-review {
    font-size: 12px;
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }
  .checkout-review > span {
    text-align: left;
  }
  .checkout-consent {
    font-size: 11px;
  }
  .checkout-status {
    font-size: 12px;
  }
  .checkout-form .button {
    font-size: 13px;
  }
  .checkout-payment-heading p {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-dot {
    animation: none;
  }
}
