/* ==========================================================================
   صفحة الشراء — تُكمل css/style.css (الألوان والخطوط والزجاج من هناك)
   لا توجد أنماط داخل الصفحة: سياسة الأمان تمنعها.
   ========================================================================== */

.sprite { position: absolute; }
.hidden { display: none !important; }
.buy-page .nav { position: fixed; }
.buy-top { padding-block-start: clamp(120px, 14vw, 170px); }

.buy { display: grid; gap: 22px; max-width: 940px; }

/* ---------- تبويبات ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  cursor: pointer; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted);
  padding: 10px 20px; border-radius: 999px; font-size: 0.97rem; transition: background .2s, color .2s, border-color .2s;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.tab:hover { color: var(--text); background: var(--glass-strong); }
.tab[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, var(--azure), #1f63d6); border-color: transparent; }

/* ---------- الخطوات ---------- */
.step { padding: clamp(20px, 3vw, 34px); display: grid; gap: 18px; }
.step__head { display: flex; align-items: center; gap: 14px; }
.step__head h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; }
.step__n {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 600; color: var(--night);
  background: linear-gradient(135deg, var(--cyan), var(--azure));
}
.step__n svg { width: 22px; height: 22px; color: #052; }
.step__n--ok { background: linear-gradient(135deg, var(--ok), #1fb67a); }
.hint { color: var(--muted); font-size: 0.97rem; }
.hint b { color: var(--text); font-weight: 600; }

/* ---------- الباقات ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan {
  position: relative; display: grid; gap: 6px; align-content: start; padding: 20px 18px 18px; cursor: pointer;
  border: 1.5px solid var(--glass-line); border-radius: var(--r); background: var(--glass);
  transition: border-color .2s, background .2s, transform .2s;
}
.plan:hover { background: var(--glass-strong); transform: translateY(-2px); }
.plan input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan:has(input:checked) { border-color: var(--cyan); background: var(--glass-strong); box-shadow: 0 0 0 4px rgba(34, 195, 238, 0.14); }
.plan:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }
.plan__name { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.plan__price { font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; line-height: 1.2; }
.plan__price small { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.plan__sdg { color: var(--faint); font-size: 0.88rem; }
.plan__list { margin-block-start: 8px; display: grid; gap: 6px; font-size: 0.93rem; color: var(--muted); }
.plan__list li { position: relative; padding-inline-start: 22px; }
.plan__list li::before { content: ""; position: absolute; inset-inline-start: 2px; inset-block-start: 0.6em; width: 11px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan__tag {
  position: absolute; inset-block-start: -12px; inset-inline-start: 16px; padding: 2px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: var(--ok); color: #04261a;
}

/* ---------- الحقول (تكمل .field من الموقع) ---------- */
.field small { color: var(--faint); font-size: 0.82rem; line-height: 1.6; }
.field label em { color: var(--signal-text); font-style: normal; font-size: 0.85em; }
.field--inline { max-width: 340px; }
.field input.mono { letter-spacing: 0.04em; }
.btn--block { width: 100%; justify-content: center; margin-block-start: 6px; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- المبلغ والحسابات ---------- */
.amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 18px 20px; border-radius: var(--r-sm); background: rgba(34, 195, 238, 0.08); border: 1px solid rgba(34, 195, 238, 0.28); }
.amount small { color: var(--muted); }
.amount b { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.2; }
.amount__sdg { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; color: var(--cyan); }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.acct { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--glass); }
.acct small { color: var(--faint); }
.acct b.mono { font-size: 1.25rem; font-weight: 500; letter-spacing: 0.05em; }
.acct__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acct__top strong { font-family: var(--f-display); font-weight: 600; }
.copy { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; border: 1px solid var(--glass-line); background: transparent; color: var(--muted); transition: color .2s, background .2s; }
.copy:hover { color: var(--text); background: var(--glass-strong); }
.copy svg { width: 15px; height: 15px; }

.lookup { padding: 12px 16px; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--glass-line); font-size: 0.95rem; }
.lookup--bad { border-color: rgba(255, 122, 82, 0.5); color: var(--signal-text); }

.err { min-height: 1.4em; color: var(--signal-text); margin-block-start: 8px; }
.notice { padding: 18px 22px; margin-block-end: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 940px; }
.notice--bad { border-color: rgba(255, 122, 82, 0.5); }

/* ---------- متابعة الطلب ---------- */
.timeline { display: grid; gap: 0; }
.timeline li { position: relative; display: flex; gap: 14px; padding-block: 12px; padding-inline-start: 0; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 8px; inset-block-start: 38px; bottom: -6px; width: 2px; background: var(--rule); }
.timeline i { flex: none; width: 18px; height: 18px; margin-block-start: 5px; border-radius: 50%; border: 2px solid var(--glass-hi); background: transparent; }
.timeline li.done i { background: var(--ok); border-color: var(--ok); }
.timeline li.wait i { border-color: #e0a100; box-shadow: 0 0 0 5px rgba(224, 161, 0, 0.18); animation: pulse 1.8s ease-in-out infinite; }
.timeline li.bad i { background: var(--signal); border-color: var(--signal); }
.timeline b { display: block; font-family: var(--f-display); font-weight: 600; }
.timeline span { color: var(--muted); font-size: 0.93rem; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(224, 161, 0, 0.04); } }
@media (prefers-reduced-motion: reduce) { .timeline li.wait i { animation: none; } }

.codes { display: grid; gap: 10px; }
.code { display: flex; gap: 10px; align-items: center; }
.code code { flex: 1; direction: ltr; text-align: center; font-family: var(--f-mono); font-size: clamp(1rem, 3.4vw, 1.3rem); letter-spacing: 0.06em; padding: 14px 10px; border-radius: 12px; background: rgba(61, 220, 151, 0.08); border: 1px dashed rgba(61, 220, 151, 0.5); user-select: all; }
.tracker__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.buy__foot { display: flex; align-items: center; gap: 10px; margin-block-start: 26px; color: var(--faint); font-size: 0.92rem; max-width: 940px; }
.buy__foot svg { width: 22px; height: 22px; color: var(--ok); flex: none; }

.light .buy__foot { color: var(--faint); }
@media (max-width: 560px) { .code { flex-direction: column; align-items: stretch; } .accounts { grid-template-columns: 1fr; } }
