/* Payment page (app.mymanagerplayer.com/pay). Builds on the site's styles.css. */
.pay {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 4rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}
main.pay > section {
  max-width: none;
  padding: 0;
}
.pay h1 {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-variation-settings: 'wdth' 115;
}
.pay .lead {
  margin-top: 1rem;
  font-size: 1.1rem;
}
.btn-block {
  width: 100%;
  padding: 1rem 1.5rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}
.btn[aria-busy='true'] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}
.msg {
  color: #ffc2b3;
  border-left: 3px solid var(--red);
  padding: 0.15rem 0 0.15rem 0.85rem;
}

/* ---------- Code entry: reads like the code on the TV ---------- */
.code-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}
.code-form label {
  font-weight: 700;
}
.code-input {
  width: 100%;
  font: inherit;
  font-variation-settings: 'wdth' 125;
  font-weight: 800;
  font-size: clamp(1.35rem, 7vw, 2.5rem);
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.7rem 0.5rem;
  border-radius: 1rem;
  background: var(--panel);
  color: var(--text);
  border: 1.5px solid var(--line);
}
.code-input::placeholder {
  color: #4d403a;
}
.code-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #ff8a3d33;
}
.code-input[aria-invalid='true'] {
  border-color: var(--red);
}

/* ---------- Plan step ---------- */
.tv-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
}
.tv-chip-label {
  color: var(--dim);
}
.tv-chip strong {
  white-space: nowrap;
  font-variation-settings: 'wdth' 125;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.link-btn {
  font: inherit;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0.35rem 0.25rem;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.status {
  margin-top: 0.85rem;
  color: var(--dim);
}
.choices {
  border: 0;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.choices legend {
  padding: 0;
  margin-bottom: 0.85rem;
  font-weight: 700;
  font-size: 1.15rem;
}
.choice {
  display: block;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 1.25rem;
  background: var(--panel);
  border: 1.5px solid var(--line);
  transition: border-color 0.15s ease;
}
/* Radio dot: the selected plan gets the brand gradient, like the lifetime card on the site. */
.choice-body::before {
  content: '';
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--dim);
}
.choice:hover .choice-body {
  border-color: #4a3a33;
}
.choice input:checked + .choice-body {
  background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box;
  border-color: transparent;
}
.choice input:checked + .choice-body::before {
  background: var(--grad);
  box-shadow: inset 0 0 0 3.5px var(--panel), 0 0 0 2px var(--orange);
}
.choice input:focus-visible + .choice-body {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.choice input:disabled + .choice-body {
  opacity: 0.5;
  cursor: not-allowed;
}
.choice-text,
.choice-price {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.choice-name {
  font-weight: 700;
  font-size: 1.1rem;
}
.choice-desc,
.choice-per {
  color: var(--dim);
  font-size: 0.9rem;
}
.choice-price {
  text-align: right;
}
.choice-amount {
  font-variation-settings: 'wdth' 125;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
#plan-form .msg {
  margin-top: 1rem;
}
#plan-form .btn-block {
  margin-top: 1.5rem;
}
.fine-print {
  margin-top: 1.25rem;
  color: var(--dim);
  font-size: 0.88rem;
  text-align: center;
}
.fine-print p + p {
  margin-top: 0.5rem;
}
.fine-print a {
  color: var(--text);
  text-decoration-color: var(--orange);
  text-underline-offset: 0.2em;
}

/* ---------- Result ---------- */
.done {
  text-align: center;
}
.done h1 {
  margin: 0 auto;
}
.done .lead {
  margin-left: auto;
  margin-right: auto;
  max-width: 30rem;
}
.done-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
}
.done-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: url(#brand);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* While waiting for the webhook: an open ring that turns; the tick appears when the TV is active. */
.done-icon.is-waiting circle {
  stroke-dasharray: 100 32;
  transform-origin: 50% 50%;
  animation: spin 1.1s linear infinite;
}
.done-icon.is-waiting path {
  opacity: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.done-note {
  margin-top: 1rem;
  color: var(--dim);
  font-size: 0.92rem;
}
.done-note:empty {
  display: none;
}
.done-actions {
  margin-top: 2rem;
}

/* Narrow phones: the price drops under the plan name so the text keeps its width. */
@media (max-width: 400px) {
  .choice-body {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.35rem 0.85rem;
    padding: 1rem 1.1rem;
  }
  .choice-body::before {
    margin-top: 0.2rem;
  }
  .choice-price {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
    text-align: left;
  }
  .choice-amount {
    font-size: 1.4rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .done-icon.is-waiting circle {
    animation: none;
  }
  .choice-body {
    transition: none;
  }
}
