/* /pagar and /pagar/listo: Premium paid with Mercado Pago. Built on site.css (tokens, header, footer). */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.page-pay .top {
  position: static;
}

.pay {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 96px;
}

.pay-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.pay-gets {
  margin: 44px 0 0;
  border-top: 1px solid var(--border);
}

.pay-gets div {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.pay-gets dt {
  font-weight: 700;
  font-stretch: 108%;
}

.pay-gets dd {
  margin: 0;
  color: var(--muted);
}

.pay-note {
  margin-top: 18px;
  color: var(--faint);
  font-size: 15px;
}

/* ---------------------------------------------------------------- the panel */

.pay-panel {
  padding: 34px 34px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.pay-step {
  margin: 0 0 34px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pay-step legend {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0;
  font-size: 19px;
  font-weight: 700;
  font-stretch: 108%;
}

.pay-n {
  color: transparent;
  font-size: 22px;
  font-weight: 800;
  font-stretch: 120%;
  -webkit-text-stroke: 1px var(--accent);
}

/* Plans read as rows of a list, name and price on one line. */
.pay-plans {
  border-top: 1px solid var(--border);
}

.pay-plan {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s var(--ease);
}

.pay-plan:hover {
  background: rgba(255, 255, 255, 0.025);
}

.pay-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-dot {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--faint);
  border-radius: 50%;
  transition: border-color 0.18s var(--ease);
}

.pay-plan input:checked + .pay-dot {
  border: 6px solid var(--accent);
}

.pay-plan input:focus-visible + .pay-dot {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.pay-plan-name {
  font-size: 18px;
  font-weight: 700;
  font-stretch: 106%;
}

.pay-plan-detail {
  grid-column: 2;
  color: var(--muted);
  font-size: 14.5px;
}

.pay-plan-price {
  grid-row: 1 / span 2;
  grid-column: 3;
  font-size: 22px;
  font-weight: 800;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}

.pay-plan-tag {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pay-plan.is-off {
  cursor: default;
  opacity: 0.45;
}

/* ---------------------------------------------------------------- the code */

.pay-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.pay-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pay-code {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--raised);
  transition: border-color 0.18s var(--ease);
}

.pay-code::placeholder {
  color: #5f5b55;
}

.pay-code:focus {
  border-color: var(--ice);
  outline: none;
}

.pay-code[aria-invalid='true'] {
  border-color: var(--red);
}

.pay-find {
  min-height: 56px;
  padding: 0 22px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}

.pay-find:hover {
  border-color: var(--faint);
}

.pay-find:disabled {
  opacity: 0.5;
  cursor: default;
}

.pay-help {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.pay-help summary {
  width: max-content;
  color: var(--ice);
  cursor: pointer;
  list-style: none;
}

.pay-help summary::-webkit-details-marker {
  display: none;
}

.pay-help summary::after {
  content: ' ›';
}

.pay-help[open] summary::after {
  content: ' ‹';
}

.pay-help p {
  margin: 10px 0 0;
  line-height: 1.5;
}

.pay-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.pay-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.45;
}

.pay-step-n {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 13px;
}

.pay-shot {
  margin: 16px 0 0;
}

.pay-shot img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pay-shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.pay-help .pay-help-note {
  font-size: 13px;
}

.pay-help-note a {
  color: var(--accent);
}

.pay-error {
  margin: 12px 0 0;
  color: #f08a7c;
  font-size: 15px;
}

.pay-phone {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--raised);
  animation: pay-in 0.32s var(--ease);
}

.pay-phone-k {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pay-phone-name {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.pay-phone-places,
.pay-phone-premium {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.pay-warn {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--yellow);
  font-size: 14.5px;
  line-height: 1.45;
}

/* ---------------------------------------------------------------- pay */

.pay-cta {
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  border: 0;
  border-radius: 16px;
  color: var(--on-accent);
  font: inherit;
  font-size: 19px;
  font-weight: 800;
  font-stretch: 108%;
  background: var(--accent);
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    filter 0.2s,
    opacity 0.2s;
}

.pay-cta small {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 600;
  font-stretch: 100%;
  opacity: 0.78;
}

.pay-cta:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.pay-cta:disabled {
  opacity: 0.35;
  cursor: default;
}

.pay-cta:focus-visible,
.pay-find:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.pay-small {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13.5px;
  line-height: 1.5;
}

.pay-off {
  padding: 8px 0;
}

.pay-off-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
}

.pay-off p:last-child {
  color: var(--muted);
}

/* ---------------------------------------------------------------- result page */

.paid {
  max-width: 620px;
  padding-top: 64px;
  padding-bottom: 120px;
}

.paid-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
}

.paid-mark svg {
  width: 28px;
  height: 28px;
}

.paid[data-state='approved'] .paid-mark {
  border-color: var(--accent);
  color: var(--accent);
}

.paid[data-state='rejected'] .paid-mark,
.paid[data-state='refunded'] .paid-mark,
.paid[data-state='missing'] .paid-mark {
  color: #f08a7c;
}

.paid[data-state='waiting'] .paid-mark,
.paid[data-state='pending'] .paid-mark {
  color: var(--ice);
}

.paid[data-state='waiting'] .paid-mark svg {
  animation: pay-spin 1.1s linear infinite;
}

.paid h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.05;
  text-wrap: balance;
}

.paid-lead {
  max-width: 40ch;
  margin-top: 18px;
  color: #dcd8d1;
  font-size: 19px;
  line-height: 1.5;
}

.paid-facts {
  margin: 36px 0 0;
  border-top: 1px solid var(--border);
}

.paid-facts div {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.paid-facts div[hidden] {
  display: none;
}

.paid-facts dt {
  color: var(--muted);
}

.paid-facts dd {
  margin: 0;
  font-weight: 700;
}

.paid-next {
  margin-top: 30px;
}

.paid-next .button {
  margin-top: 0;
}

@keyframes pay-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes pay-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pay-phone,
  .paid[data-state='waiting'] .paid-mark svg {
    animation: none;
  }
}

@media (max-width: 860px) {
  .pay {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 12px;
  }

  /* On a phone the form comes right after the title; what Premium includes goes below it. */
  .pay-intro {
    display: contents;
  }

  .pay-intro > .eyebrow,
  .pay-intro > h1,
  .pay-intro > .lead {
    order: 1;
  }

  .pay-panel {
    order: 2;
    margin-top: 30px;
  }

  .pay-gets {
    order: 3;
    margin-top: 40px;
  }

  .pay-note {
    order: 4;
  }

  .pay-gets div {
    grid-template-columns: 8em minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .pay.wrap {
    padding: 0 16px 72px;
  }

  .pay-panel {
    margin-right: -4px;
    margin-left: -4px;
    padding: 26px 18px 22px;
    border-radius: 18px;
  }

  .pay-gets div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .pay-plan-price {
    font-size: 19px;
  }

  .paid {
    padding-top: 32px;
  }

  .paid-facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}
