/* Pricing + checkout — UnifyTrade look, data-driven. */

.pr-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pr-main {
  gap: 20px;
}

.pr-head {
  text-align: center;
  padding: 10px 0 0;
}

.pr-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -.02em;
}

.pr-head p {
  margin: 0 auto 16px;
  max-width: 560px;
}

.pr-period {
  display: inline-flex;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.pr-period button,
.toggle.sm button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  padding: 7px 14px;
  cursor: pointer;
}

.toggle.sm {
  display: inline-flex;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.toggle.sm button {
  padding: 5px 11px;
  font-size: 12px;
}

.pr-period button + button,
.toggle.sm button + button {
  border-inline-start: .5px solid var(--border-strong);
}

.pr-period button.is-active,
.toggle.sm button.is-active {
  background: var(--cyan-dim);
  color: var(--cyan);
}

.pr-save {
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 11px;
}

.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pr-card {
  position: relative;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pr-card.is-recommended {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan-dim);
}

.pr-card.is-current {
  border-color: var(--border-strong);
}

.pr-badge {
  position: absolute;
  top: -11px;
  inset-inline-start: 20px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--cyan);
  color: #0A0E13;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
}

.pr-card h2 {
  margin: 0;
  font-size: 18px;
}

.pr-price {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.pr-price .muted {
  font-size: 12.5px;
  font-weight: 500;
}

.pr-trial {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

.pr-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  min-height: 36px;
}

.pr-features {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  flex: 1;
}

.pr-features li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pr-features li svg {
  color: var(--green);
  flex: none;
}

.pr-features li.is-off {
  color: var(--text-muted);
}

.pr-features li.is-off svg {
  color: var(--text-muted);
}

.pr-cta {
  margin-top: 8px;
}

.pr-cta .btn {
  width: 100%;
  justify-content: center;
}

dialog.checkout-dialog {
  max-width: min(600px, calc(100vw - 32px));
}

.co-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.co-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.co-method span {
  display: grid;
  gap: 1px;
  font-size: 12.5px;
}

.co-coin {
  flex: none;
  display: block;
  border-radius: 50%;
}

.co-method small {
  color: var(--text-muted);
  font-size: 11px;
}

.co-method.is-active {
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

.co-method:disabled {
  opacity: .5;
  cursor: default;
}

.co-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.co-coupon {
  display: flex;
  gap: 8px;
}

.co-summary {
  border: .5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  padding: 10px 12px;
  font-size: 12.5px;
  display: grid;
  gap: 4px;
}

.co-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.co-summary b {
  font-variant-numeric: tabular-nums;
}

.co-summary .co-total {
  border-top: .5px solid var(--border);
  padding-top: 6px;
  margin-top: 2px;
  font-size: 14px;
}

/* What happens after today: the first real charge and when it lands. */
.co-summary .co-after {
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.co-pay {
  margin-top: 12px;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.co-pay.is-paid {
  border-color: var(--green);
}

.co-pay-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.co-address code {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.co-status {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .04em;
}

.badge-green { background: var(--green-dim); color: var(--green); }
.badge-amber { background: var(--amber-dim); color: var(--amber); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-muted { background: var(--surface-raised); color: var(--text-secondary); }
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); }

/* ------------------------------------------------------------------ */
/* Pricing and checkout review                                         */
/* ------------------------------------------------------------------ */

/* ---- plan cards ---------------------------------------------------- */

.pr-main {
  grid-template-columns: minmax(0, 1fr);
}

.pr-grid {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.pr-card {
  gap: 8px;
}

.pr-card.is-recommended {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cyan) 7%, transparent), transparent 42%),
    var(--surface);
}

.pr-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pr-current {
  padding: 2px 9px;
  border-radius: 999px;
  border: .5px solid var(--border-strong);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.pr-desc {
  min-height: 0;
}

/* The figure a reader compares, big; its unit beside it, quiet. */
.pr-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.pr-amount {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.pr-per {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.pr-billed {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.pr-trial {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-dim);
}

.pr-cta {
  margin: 8px 0 6px;
}

.pr-cta .btn {
  min-height: 42px;
}

.pr-features {
  padding-top: 14px;
  border-top: .5px solid var(--border);
}

.pr-features li {
  align-items: flex-start;
}

.pr-features li svg {
  margin-top: 2px;
}

@media (max-width: 640px) {
  .pr-head h1 {
    font-size: 25px;
  }

  .pr-card {
    padding: 20px 18px 16px;
  }
}

/* ---- checkout: a form and what it buys ----------------------------- */

dialog.checkout-dialog {
  max-width: min(960px, calc(100vw - 32px));
}

dialog.checkout-dialog .dialog-body {
  max-height: min(72vh, 680px);
}

.co-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
}

.co-block {
  margin: 0 0 18px;
}

.co-h {
  margin: 0 0 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* How to pay: three cards, each with its mark. */
.co-methods {
  margin: 0;
}

.co-method {
  padding: 12px;
  min-height: 62px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}

.co-method span {
  min-width: 0;
}

.co-method b {
  font-size: 13.5px;
}

.co-method small {
  line-height: 1.35;
}

.co-mark,
.co-coin {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

.co-mark {
  background: var(--surface-raised);
  color: var(--text);
}

.co-coin-usdt {
  background: #26A17B;
  color: #fff;
}

.co-coin-usdc {
  background: #2775CA;
  color: #fff;
}

/* For how long: options you pick one of, each saying what it costs. */
.co-opts {
  display: grid;
  gap: 8px;
}

.co-opt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}

.co-opt:hover {
  border-color: var(--cyan);
}

.co-opt.is-active {
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

.co-opt-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
}

.co-opt.is-active .co-opt-radio {
  border-color: var(--cyan);
}

.co-opt.is-active .co-opt-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.co-opt-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.co-opt-text b {
  font-size: 13.5px;
  font-weight: 600;
}

.co-opt-text small {
  font-size: 12px;
  color: var(--text-secondary);
}

.co-opt-badge {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 11px;
  font-weight: 650;
  vertical-align: 1px;
}

.co-opt-price {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.co-select {
  display: flex;
}

.co-select .select {
  width: 100%;
}

.co-hint {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.co-hint.pos { color: var(--green); }
.co-hint.neg { color: var(--red); }

/* A promo code is for the few who have one: folded until it is wanted. */
.co-promo summary {
  display: inline-block;
  cursor: pointer;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 550;
  list-style: none;
}

.co-promo summary::-webkit-details-marker {
  display: none;
}

.co-promo[open] summary {
  margin-bottom: 9px;
}

.co-coupon .input {
  flex: 1;
  min-width: 0;
}

/* What is being bought, always in view beside the choices. */
.co-side {
  position: sticky;
  top: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.co-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.co-plan-name {
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -.01em;
}

.co-trial {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
}

.co-includes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.co-includes li,
.co-trust li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.co-includes svg {
  flex: none;
  margin-top: 2px;
  color: var(--green);
}

.co-side .co-summary {
  border: none;
  border-top: .5px solid var(--border);
  border-radius: 0;
  background: none;
  padding: 12px 0 0;
  gap: 7px;
}

.co-summary b.pos {
  color: var(--green);
}

.co-side .co-summary .co-total {
  font-size: 15px;
  padding-top: 10px;
  margin-top: 4px;
}

.co-side .co-summary .co-total b {
  font-size: 20px;
  letter-spacing: -.02em;
}

.co-trust {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: .5px solid var(--border);
  display: grid;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.co-trust svg {
  flex: none;
  margin-top: 1px;
  color: var(--cyan);
}

/* The total in the footer belongs to the phone layout below. */
.co-foot-total {
  display: none;
}

/* ---- paying in crypto ---------------------------------------------- */

.co-pay {
  margin: 0;
  padding: 16px;
  gap: 14px;
  border-radius: var(--radius-lg);
}

.co-pay-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.co-qr {
  padding: 8px;
  border-radius: var(--radius-md);
  background: #fff;
  line-height: 0;
}

.co-qr svg {
  width: 152px;
  height: 152px;
}

.co-pay-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.co-field {
  display: grid;
  gap: 4px;
}

.co-field > span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.co-field b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.co-copyrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.co-copyrow code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.co-pay-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.co-pay-actions:empty {
  display: none;
}

.badge {
  font-size: 11px;
}

/* ---- a phone: one column, the whole screen ------------------------- */

@media (max-width: 760px) {
  dialog.checkout-dialog {
    max-width: 100vw;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
  }

  dialog.checkout-dialog .dialog-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: none;
  }

  dialog.checkout-dialog .dialog-body {
    flex: 1;
    max-height: none;
    padding: 16px;
  }

  dialog.checkout-dialog .dialog-foot {
    flex-wrap: wrap;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }

  dialog.checkout-dialog .dialog-foot .foot-note:empty {
    display: none;
  }

  dialog.checkout-dialog .dialog-foot .foot-note:not(:empty) {
    flex-basis: 100%;
  }

  /* Cancel is the ✕ at the top; the footer is the total and the button. */
  dialog.checkout-dialog .dialog-foot .btn-secondary[data-close-dialog] {
    display: none;
  }

  .co-foot-total {
    display: grid;
    margin-inline-end: auto;
    line-height: 1.2;
  }

  .co-foot-total small {
    font-size: 11.5px;
    color: var(--text-muted);
  }

  .co-foot-total b {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
  }

  dialog.checkout-dialog #checkout-primary {
    min-height: 44px;
    padding-inline: 20px;
  }

  .co-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .co-side {
    position: static;
  }

  .co-pay-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .co-pay-fields {
    justify-self: stretch;
  }
}

@media (max-width: 480px) {
  /* Three methods in 358px: the mark over the name, the note under it. */
  .co-method {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }

  .co-method small {
    font-size: 11px;
  }
}

/* The network picker. Pricing does not load the app's .select, so it was the
   browser's own grey box inside a dark dialog. */
.co-select .select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 42px;
  padding: 9px 36px 9px 12px;
  border: .5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

[dir="rtl"] .co-select .select {
  padding: 9px 12px 9px 36px;
  background-position: left 11px center, left 16px center;
}

.co-select .select option {
  background: var(--surface);
  color: var(--text);
}

@media (max-width: 760px) {
  /* While paying there is no total or button in the footer: the way out
     comes back so the footer is not an empty bar. */
  dialog.checkout-dialog:has(.co-layout.is-paying) .dialog-foot .btn-secondary[data-close-dialog] {
    display: inline-flex;
    margin-inline-start: auto;
  }
}
