/* ==========================================================
   Nullik Academy — Checkout (multi-step modal) styles
   ========================================================== */

.checkout {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: flex-end; justify-content: center;
}
.checkout.is-open { display: flex; }
@media (min-width: 768px) { .checkout { align-items: center; } }

.checkout__backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 8, 18, 0.7); backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.checkout__dialog {
  position: relative; width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto;
  padding: 26px; border-radius: 26px 26px 0 0;
  animation: sheetUp 0.45s var(--ease);
}
@media (min-width: 768px) { .checkout__dialog { border-radius: 26px; animation: popIn 0.4s var(--ease); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.checkout__close { position: absolute; top: 16px; left: 18px; display: inline-flex; line-height: 1; color: var(--text-dim); z-index: 5; }
.checkout__close:hover { color: var(--text); }

/* Progress — minimal segmented bar (not sticky, no background band) */
.checkout__progress { padding: 4px 0 18px; margin: 6px 0 4px; padding-left: 42px; }
.progress-bar { display: flex; gap: 6px; }
.progress-seg { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-2); transition: background 0.4s var(--ease); }
.progress-seg.is-done { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.progress-seg.is-active { background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* Steps */
.cstep { display: none; animation: stepIn 0.4s var(--ease); }
.cstep.is-active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.cstep__title { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.cstep__subtitle { font-size: 1rem; font-weight: 700; margin: 22px 0 12px; }
.cstep__hint { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 18px; }
.cstep__nav { display: flex; gap: 12px; margin-top: 22px; }
.cstep__nav .btn { flex: 1; }

/* Phone input — prefix (flag + +98) on the LEFT */
.phone-input { display: flex; direction: ltr; align-items: stretch; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.phone-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(66,165,255,0.18); }
.phone-input__prefix { display: flex; align-items: center; gap: 6px; padding: 0 12px; background: rgba(255,255,255,0.04); border-right: 1px solid var(--border); font-size: 0.95rem; white-space: nowrap; }
.phone-input__prefix img { border-radius: 3px; display: block; }
.phone-input__prefix b { font-weight: 700; letter-spacing: 0; }
.phone-input__field { flex: 1; padding: 14px 16px; background: transparent; border: none; color: var(--text); font-size: 1rem; letter-spacing: 2px; direction: ltr; text-align: left; }
.phone-input__field:focus { outline: none; }

/* OTP */
.otp-inputs { display: flex; gap: 12px; justify-content: center; margin-bottom: 8px; }
.otp-box {
  width: 60px; height: 68px; text-align: center; font-size: 1.8rem; font-weight: 800;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 2px solid var(--border); color: var(--text);
  transition: all 0.2s;
}
.otp-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(66,165,255,0.2); transform: translateY(-2px); }
.otp-box.is-filled { border-color: var(--accent); }
.otp-inputs.is-success .otp-box { border-color: var(--success); box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.otp-inputs.is-error .otp-box { border-color: var(--danger); animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-6px);} 75%{transform:translateX(6px);} }
.otp-actions { display: flex; justify-content: space-between; margin-top: 12px; }

/* Password — toggle on the end side so text aligns with the email field */
/* Password — eye on the visual right; text aligns with the email field */
.password-input { position: relative; }
.password-input .input { padding-right: 46px; padding-left: 16px; }
.password-input__toggle { position: absolute; right: 12px; left: auto; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--text-dim); opacity: 0.8; background: none; border: none; cursor: pointer; }
.password-input__toggle:hover { opacity: 1; color: var(--text); }

/* Review card */
.review-card { padding: 20px; }
.review-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; }
.review-row:last-child { border-bottom: none; }
.review-row span:first-child { color: var(--text-dim); }
.review-row span:last-child { font-weight: 700; }
.review-row--total span:last-child { color: var(--accent); font-size: 1.1rem; }
.review-row__pwd { display: inline-flex; align-items: center; gap: 8px; }
.review-row__pwd button { display: inline-flex; align-items: center; color: var(--text-dim); opacity: 0.85; background: none; border: none; cursor: pointer; }
.review-row__pwd button:hover { opacity: 1; color: var(--text); }

/* Payment methods */
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-method { display: block; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 2px solid var(--border); cursor: pointer; transition: all 0.25s var(--ease); }
.pay-method input { display: none; }
.pay-method.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(66,165,255,0.2); }
.pay-method.is-disabled { opacity: 0.5; cursor: not-allowed; }
.pay-method__body { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pay-method__title { font-weight: 700; }
.pay-method__tag { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--text-mute); }
.pay-method__tag--ok { background: rgba(34,197,94,0.18); color: var(--success); }

/* Bank card (Pasargad-inspired) */
.bank-card {
  margin-top: 18px; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, #14233f 0%, #0c1830 55%, #0a1322 100%);
  border: 1px solid rgba(66,165,255,0.22);
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  color: #EAF1FF; position: relative; overflow: hidden;
}
.bank-card::after {
  content: ""; position: absolute; top: -40%; left: -10%; width: 60%; height: 180%;
  background: radial-gradient(closest-side, rgba(66,165,255,0.14), transparent); pointer-events: none;
}
.bank-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; position: relative; z-index: 1; }
.bank-card__logo { width: auto; display: block; }
.bank-card__logo--bank { height: 48px; }
.bank-card__logo--shetab { height: 24px; }
.bank-card__row { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); position: relative; z-index: 1; }
.bank-card__label { font-size: 0.78rem; color: rgba(234,241,255,0.5); }
.bank-card__value { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; color: #EAF1FF; }
.bank-card__value > span { direction: ltr; word-break: break-all; }
.bank-card__row--name { border-bottom: none; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 16px; }
.bank-card__holder { font-weight: 700; color: #EAF1FF; letter-spacing: 0; }
.copy-btn { flex: 0 0 auto; padding: 7px 16px; border-radius: 10px; background: rgba(66,165,255,0.16); color: var(--accent); font-size: 0.78rem; font-weight: 700; border: 1px solid rgba(66,165,255,0.3); transition: background 0.2s; }
.copy-btn:hover { background: rgba(66,165,255,0.3); }
.copy-btn.is-copied { background: var(--success); color: #fff; border-color: transparent; }

.pay-note { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.35); color: #BBF7D0; font-size: 0.9rem; line-height: 2; }
.pay-note__amount { color: #fff; font-weight: 800; }

/* Uploader */
.uploader {
  margin-top: 8px; padding: 30px; border-radius: var(--radius); border: 2px dashed var(--border);
  background: var(--surface-2); text-align: center; cursor: pointer; transition: all 0.25s var(--ease);
}
.uploader:hover, .uploader.is-drag { border-color: var(--accent); background: rgba(66,165,255,0.08); }
.uploader__placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-dim); }
.uploader__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); }
.uploader__preview { max-height: 260px; border-radius: var(--radius-sm); margin-inline: auto; }

/* No-scroll body when modal open */
body.is-locked { overflow: hidden; }
