/* =====================================================================
   pricing.css — The in-app Pricing tab (pages/pricing.html).
   Card grid for the one-time plans + the pay-per-resume option.
   ===================================================================== */

.pricing {
  min-height: calc(100vh - var(--rz-nav-h));
  background: var(--rz-bg-soft);
  padding: 40px 0 72px;
}

.pricing-head { text-align: center; max-width: 720px; margin: 0 auto 12px; }
.pricing-head h1 { font-weight: 600; font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 1.07; margin: 8px 0 12px; }
.pricing-head p { color: var(--rz-muted); font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.38; margin: 0; }

/* Current plan strip -------------------------------------------------- */
.pricing-current {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px auto 30px;
  padding: 12px 18px;
  max-width: 640px;
  background: #fff;
  border: 0;
  border-radius: var(--rz-radius-pill);
  font-size: .9rem;
}
.pricing-current .label { color: var(--rz-muted); }
.pricing-current .value { font-family: var(--rz-font-head); font-weight: 600; color: var(--rz-ink); }
.pricing-current.is-paid { background: #fff; }
.pricing-current.is-paid .value { color: var(--color-ok); }

/* Plan grid ----------------------------------------------------------- */
.plan-grid {
  display: grid;
  /* Up to 4 plans per row (4 x 265px fits the 1140px container), centred. */
  grid-template-columns: repeat(auto-fit, minmax(230px, 265px));
  justify-content: center;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 1080px) { .plan-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } }
@media (max-width: 560px)  { .plan-grid { grid-template-columns: 1fr; } }

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0;
  border-radius: var(--rz-radius-lg);
  padding: 30px 24px 24px;
}

/* Highlighted plan: a thin blue edge, no shadow or lift */
.plan-card.is-featured { box-shadow: 0 0 0 2px var(--rz-primary); }

/* Launch-style label: bare orange text, no pill */
.plan-badge {
  position: absolute;
  top: 12px; left: 24px;
  font-family: var(--rz-font-body);
  font-size: .75rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--color-launch-orange);
  white-space: nowrap;
}
.plan-card:has(.plan-badge) { padding-top: 40px; }

.plan-name {
  font-family: var(--rz-font-head);
  font-size: 1.3rem; font-weight: 600; color: var(--rz-ink);
  margin: 0 0 12px;
}

.plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-price .cur { font-size: .95rem; font-weight: 600; color: var(--rz-muted); }
.plan-price .amt {
  font-family: var(--rz-font-head);
  font-size: 2.5rem; font-weight: 600; color: var(--rz-ink); line-height: 1;
  letter-spacing: -.015em;
}
.plan-price .per { font-size: .86rem; color: var(--rz-muted); }

.plan-sub { margin: 8px 0 0; font-size: .84rem; color: var(--rz-muted); min-height: 20px; }
.plan-save {
  display: inline-block; margin-top: 8px;
  font-size: .75rem; font-weight: 600;
  color: var(--color-launch-orange); background: none;
  border: 0; border-radius: 0;
  padding: 0;
}

.plan-feats { list-style: none; margin: 18px 0 20px; padding: 0; display: grid; gap: 9px; }
.plan-feats li { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--rz-body); }
.plan-feats .rz-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--rz-ink); }

/* margin-top:auto pins every button to the card bottom, so cards with and
   without a "Save %" pill line up. */
.plan-cta { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--color-control-gray); }
.plan-cta .btn { width: 100%; }

/* Single-resume (pay per download) ------------------------------------ */
.plan-single {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: var(--rz-radius-lg);
  padding: 30px;
}
@media (max-width: 720px) { .plan-single { grid-template-columns: 1fr; } }
.plan-single h3 { font-size: 1.5rem; margin: 0 0 6px; }
.plan-single p { color: var(--rz-muted); margin: 0 0 14px; font-size: .92rem; }
.plan-single .plan-feats { margin-top: 0; }
.plan-single-buy { text-align: center; }

/* Watermark explainer -------------------------------------------------- */
.pricing-note {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 0;
  border-radius: var(--rz-radius-lg);
  padding: 18px 20px;
  font-size: .9rem;
  color: var(--rz-body);
}
.pricing-note strong { color: var(--rz-ink); }
.pricing-note .rz-icon { width: 20px; height: 20px; flex: none; color: var(--rz-ink); margin-top: 2px; }

/* Gateway-pending state (checkout is not wired yet) --------------------- */
.pricing-pending {
  margin: 26px auto 0;
  max-width: 720px;
  text-align: center;
  font-size: .88rem;
  color: var(--rz-muted);
}

/* Plan picked on the landing page (?plan=<code>) -------------------- */
.plan-card.is-chosen,
.plan-single.is-chosen {
  outline: 0;
  box-shadow: 0 0 0 2px var(--rz-primary), 0 0 0 6px rgba(0, 113, 227, .18);
}

/* Safepay plans */
.plan-desc { margin: 10px 0 0; font-size: .84rem; color: var(--rz-body); }
.plan-empty { grid-column: 1 / -1; text-align: center; color: var(--rz-muted); padding: 28px 12px; border: 0; background: #fff; border-radius: var(--rz-radius-lg); }
.pricing-pending.is-warn { color: var(--rz-ink); background: #fff6e5; border: 0; border-radius: var(--rz-radius-sm); padding: 12px 16px; }
.btn.is-busy { opacity: .7; pointer-events: none; }

/* Payment return page */
.pay-card { max-width: 520px; margin: 40px auto 60px; text-align: center; background: #fff; border: 0; border-radius: var(--rz-radius-lg); padding: 44px 32px; }
.pay-card h1 { font-size: 2rem; margin: 18px 0 8px; }
.pay-card p { color: var(--rz-muted); margin: 0 0 20px; }
.pay-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; }
.pay-icon svg { width: 30px; height: 30px; }
.pay-icon.is-wait { background: var(--rz-bg-soft); }
.pay-icon.is-ok { background: #e3f1e6; color: var(--color-ok); }
.pay-icon.is-warn { background: #fff0e0; color: var(--color-launch-orange); }
.pay-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--color-control-gray); border-top-color: var(--rz-primary); animation: payspin .8s linear infinite; }
@keyframes payspin { to { transform: rotate(360deg); } }
.pay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Easypaisa QR payment (payment.html?order=...) ------------------------- */
.ep { max-width: 880px; margin: 8px auto 40px; }
.ep-head { text-align: center; margin-bottom: 28px; }
.ep-head h1 { font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1.05; margin: 6px 0 10px; }
.ep-head p { color: var(--rz-muted); margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.ep-ref { color: var(--rz-ink); font-weight: 600; letter-spacing: .04em; }
.ep-copy { border: 0; background: var(--color-control-gray); color: var(--rz-ink); border-radius: var(--rz-radius-pill); padding: 3px 12px; font-size: .78rem; cursor: pointer; }
.ep-copy:hover { background: #dcdce0; }
.ep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ep-card { background: #fff; border-radius: var(--rz-radius-lg); padding: 28px; }
.ep-card h2 { font-size: 1.4rem; margin: 0 0 14px; }
.ep-qr-card { text-align: center; }
.ep-qr { display: inline-block; background: #fff; padding: 14px; border-radius: 20px; box-shadow: 0 0 0 1px var(--color-control-gray); }
.ep-qr img { display: block; width: min(260px, 64vw); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.ep-till { margin: 16px 0 2px; color: var(--rz-muted); }
.ep-till b, .ep-acct b { color: var(--rz-ink); letter-spacing: .02em; }
.ep-acct { margin: 0; color: var(--rz-muted); font-size: .9rem; }
.ep-save { margin-top: 14px; padding: 7px 18px; font-size: .88rem; }
.ep-steps { margin: 0 0 16px; padding-left: 1.3em; display: grid; gap: 10px; }
.ep-steps li::marker { color: var(--rz-muted); font-weight: 600; }
.ep-hint { margin: 0; padding: 12px 14px; background: var(--rz-bg-soft); border-radius: var(--rz-radius-sm); font-size: .86rem; color: var(--rz-muted); }
.ep-form .ep-sub { color: var(--rz-muted); margin: -6px 0 20px; }
.ep-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ep-file { display: flex; align-items: center; gap: 14px; border: 1px dashed var(--color-steel); border-radius: var(--rz-radius-field); padding: 14px 16px; cursor: pointer; color: var(--rz-primary-600); font-size: .94rem; font-weight: 400 !important; margin: 0 !important; }
.ep-file:hover { background: var(--rz-bg-softer); }
.ep-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ep-file img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--color-control-gray); flex: none; }
.ep-file span { overflow-wrap: anywhere; }
.rz-field.is-invalid .ep-file { border-color: #e30000; background: #fff5f5; }
.ep-fine { font-size: .8rem; color: var(--rz-muted); margin: 4px 0 14px; }
.ep-submit { width: 100%; }
.ep-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; text-align: left; max-width: 360px; margin: 0 auto 22px; padding: 14px 18px; background: var(--rz-bg-soft); border-radius: var(--rz-radius-sm); font-size: .9rem; }
.ep-details dt { color: var(--rz-muted); font-weight: 400; }
.ep-details dd { margin: 0; color: var(--rz-ink); font-weight: 600; overflow-wrap: anywhere; }
.pay-actions .btn + .btn { margin-left: 0; }
@media (max-width: 720px) {
  .ep-grid, .ep-fields { grid-template-columns: 1fr; }
  .ep-card { padding: 22px; }
}
