/* ============ Disable zoom on touch devices ============ */
html {
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* {
  -webkit-touch-callout: none;
}
input, textarea, select {
  font-size: 16px !important;
}

/* ============================================================
   CHECKOUT PAGE STYLES
   ============================================================ */

.chk-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
  position: relative;
  z-index: 2;
}

.chk-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.chk-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.chk-back:hover { color: var(--accent-gold); }

.chk-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text-primary);
}
.chk-logo svg { width: 32px; height: 32px; }

.chk-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 6px;
}
.chk-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.chk-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
}
@media (max-width: 900px) {
  .chk-layout { grid-template-columns: 1fr; }
}

.chk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.chk-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chk-step {
  width: 26px;
  height: 26px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* Billing toggle */
.chk-billing {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin-bottom: 20px;
}
.chk-billing-opt {
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  font-family: inherit;
  transition: all 0.2s;
}
.chk-billing-opt.active {
  background: var(--accent-gold);
  color: var(--bg-primary);
}
.chk-billing-opt .chk-discount {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 6px;
  background: var(--accent-green);
  color: var(--bg-primary);
  font-size: 10px;
  border-radius: 4px;
  font-weight: 700;
}

/* Plan cards */
.chk-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .chk-plans { grid-template-columns: 1fr; }
}

.chk-plan {
  padding: 16px;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.chk-plan:hover {
  border-color: rgba(255, 184, 0, 0.3);
}
.chk-plan.selected {
  border-color: var(--accent-gold);
  background: var(--accent-gold-dim);
}
.chk-plan.popular::before {
  content: attr(data-badge);
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.chk-plan-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.chk-plan-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 2px;
}
.chk-plan-period {
  color: var(--text-muted);
  font-size: 11px;
}
.chk-plan-desc {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.5;
}

/* Customer info */
.chk-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .chk-form-row { grid-template-columns: 1fr; }
}

.chk-field { margin-bottom: 12px; }
.chk-field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.chk-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}
.chk-field input:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.chk-field input[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.chk-field .chk-hint {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 4px;
}

/* User bar (when logged in) */
.chk-user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 16px;
}
.chk-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: var(--bg-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.chk-user-info { flex: 1; }
.chk-user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.chk-user-email {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  text-align: start;
}

/* Referral badge */
.chk-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-green-dim);
  border: 1px solid rgba(0, 255, 135, 0.25);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent-green);
  margin-bottom: 12px;
}

/* Summary sidebar */
.chk-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 20px;
  height: fit-content;
}

.chk-sum-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
}
.chk-sum-row.total {
  border-top: 1px solid var(--border-subtle);
  margin-top: 10px;
  padding-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.chk-sum-row .chk-sum-label { color: var(--text-secondary); }
.chk-sum-row .chk-sum-value { color: var(--text-primary); font-weight: 600; }
.chk-sum-row.total .chk-sum-value {
  color: var(--accent-gold);
  font-size: 26px;
}
.chk-sum-row.discount .chk-sum-value { color: var(--accent-green); }

.chk-cycle-small {
  font-size: 14px;
  color: var(--text-muted);
  margin-inline-start: 4px;
}

/* Terms check */
.chk-terms {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.chk-terms input { margin-top: 2px; flex-shrink: 0; }
.chk-terms a { color: var(--accent-gold); text-decoration: none; }
.chk-terms a:hover { text-decoration: underline; }

/* PayPal wrapper */
.chk-paypal { margin-top: 20px; min-height: 60px; }

.chk-unavailable {
  padding: 20px;
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.chk-unavailable strong {
  color: var(--accent-gold);
  display: block;
  margin-bottom: 6px;
}

/* USDT button */
.chk-usdt {
  width: 100%;
  padding: 14px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  transition: border-color 0.2s;
}
.chk-usdt:hover { border-color: var(--accent-gold); }

/* Divider */
.chk-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  margin: 14px 0 6px;
  position: relative;
}
.chk-divider::before,
.chk-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-subtle);
}
.chk-divider::before { right: 0; }
.chk-divider::after { left: 0; }
html[dir="ltr"] .chk-divider::before { left: 0; right: auto; }
html[dir="ltr"] .chk-divider::after { right: 0; left: auto; }

/* Included list */
.chk-included {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.chk-included h4 {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.chk-included li {
  list-style: none;
  padding: 6px 0;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
}
.chk-included li::before {
  content: "✓";
  color: var(--accent-green);
  font-weight: 700;
  flex-shrink: 0;
}

/* Secure badges */
.chk-secure {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  flex-wrap: wrap;
}

/* Loading spinner */
.chk-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}
.chk-loading::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: chkSpin 0.8s linear infinite;
  margin-inline-end: 10px;
}
@keyframes chkSpin { to { transform: rotate(360deg); } }

/* Error box */
.chk-error {
  padding: 12px 14px;
  background: var(--accent-red-dim);
  border: 1px solid rgba(255, 59, 92, 0.3);
  border-radius: 8px;
  color: var(--accent-red);
  font-size: 13px;
  margin: 12px 0;
}

/* Success page */
.chk-success-wrap {
  max-width: 560px;
  margin: 60px auto;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.chk-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--accent-green-dim);
  border: 2px solid var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--accent-green);
}
.chk-success-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}
.chk-success-msg {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}
.chk-sub-id-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 24px;
}
.chk-sub-id-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.chk-sub-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-green);
  word-break: break-all;
  direction: ltr;
  text-align: center;
}
