/* ══════════════════════════════════════════════════════════════════════════
   صفحة الشراء والدفع دون حساب ومتابعة الطلب (2026-10-15)
   components/BuyPanel.jsx · OrderSummary.jsx · GuestPay.jsx · pages/checkout/Checkout.jsx · pages/Track.jsx
   يُحمَّل بعد store.css وmotion.css: يغيّر تخطيط صفحة الشراء (.buy.co-buy) بمحدّدات أقوى قليلاً، ولا يمسّ صفحات
   السجلّ التي تشاركها الأصناف (.buy-hero في /orders/:id…).
   التخطيط يتبع عرض الصفحة نفسها (container query) لا الشاشة: داخل الحساب يأخذ الشريط الجانبي جزءاً منها.
   الجوال: المنتج سطراً، ثم الخطوات، والإجمالي والزرّ في بطاقة سفلية عائمة لاصقة (داخل هامش الصفحة، لا لوح بعرض الشاشة).
   العريض (≥ 840px للصفحة): الخطوات في عمود، وبجانبها ملخّص لاصق تحت الشريط العلوي فيه الإجمالي والزرّ.
   الحركة: تحويل وشفافية فقط، مرّة واحدة؛ «تقليل الحركة» يوقفها (آخر الملف).
   المالك 2026-11-10: الحركة والزينة عادت بعد تهدئة 2026-11-09 (التي أزالت أكثر من اللازم). ما أُزيل لأنه يكرّر معلومة
   (حبّة «× 3»، حبّة الانتظار في الشريط، «وصل X من Y» تحت المبلغ) لا يعود: كل معلومة مرّة واحدة في الشاشة.
   الإطارات المتحركة التي كانت في motion.css (m-rise / bar-up / sum-pop / pic-pop) معرّفة هنا بأسماء co-* فلا تتأثّر بتغييره.
   ══════════════════════════════════════════════════════════════════════════ */

.co-page, .trk-wrap { container: co / inline-size; }
.co-page { gap: var(--s-6); }
/* هامش جانبي حقيقي (16px على الأقل) على الهاتف مهما كان هامش الغلاف: الصفحة لا تتجاوز عرض الشاشة ناقص 32px */
.co-flow, .trk-wrap, .track { width: min(100%, calc(100vw - 2 * var(--s-4))); margin-inline: auto; }
/* الجوال: بطاقة الزرّ تستقرّ في آخر الصفحة قريبة من التذييل (لا فراغ الحاشية السفلية كاملة تحتها) */
@media (max-width: 839.98px) { .co-flow { margin-bottom: calc(-1 * var(--s-16)); } }

/* ───── الشبكة ───── */
.buy.co-buy { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "hero" "main" "side"; gap: var(--s-6); column-gap: 0; }
.buy.co-checkout { grid-template-areas: "main" "side"; }
.co-buy > .co-hero { grid-area: hero; grid-row: auto; position: relative; top: auto; }
.co-buy > .co-main { grid-area: main; display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.co-buy > .co-side { grid-area: side; }
/* a short page (few packs, no fields): the bottom bar sat right under the last step, halfway up the screen. The page
   fills the screen and the bar's row is the last one, so it rests on the bottom edge and stays sticky when the page is longer. */
.buy.co-buy { min-height: calc(100dvh - var(--shell-offset, 112px) - var(--s-6)); grid-template-rows: auto auto 1fr; }
/* صفحتا الدفع: لا حشو حتى أسفل الشاشة — كان يترك فراغاً كبيراً فوق الشريط أو تحته قبل التذييل؛ الصفحة بطول محتواها */
.buy.co-checkout { min-height: 0; grid-template-rows: auto; }
.co-buy > .co-side { align-self: end; }

/* ───── المنتج: سطر واحد — الصورة بجانب الاسم والوصف ───── */
.co-buy > .co-hero { --pic: 84px; --ring-x: calc(var(--s-4) + var(--pic) / 2); --ring-y: 50%;
  flex-direction: row; align-items: center; gap: var(--s-4); padding: var(--s-4); border-radius: 24px; text-align: start; }
.co-hero .buy-pic { border-radius: 24px; }
.co-hero .buy-head { align-items: flex-start; gap: var(--s-1); max-width: 60ch; }
.co-hero .buy-title { font-size: 21px; line-height: 1.3; }
@container co (min-width: 640px) {
  .co-buy > .co-hero { --pic: 104px; --ring-x: calc(var(--s-6) + var(--pic) / 2); gap: var(--s-5); padding: var(--s-5) var(--s-6); border-radius: 28px; }
  .co-hero .buy-pic { border-radius: 30px; }
  .co-hero .buy-title { font-size: 26px; }
}

/* ───── الملخّص ─────
   الجوال: شريط سفلي لاصق (الإجمالي والزرّ) — variant="card" لا يظهر (صفحة طريقة الدفع تعرض .co-mini) */
.co-side { position: sticky; bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; gap: var(--s-3); min-width: 0;
  margin: 0; padding-block: var(--s-2); padding-inline: var(--s-4) var(--s-2); border-radius: var(--r-4); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-3); animation: co-bar-up .5s var(--ease-emph) .15s backwards; }
/* USDT: no button and no amount in the bar — nothing for the phone's bar to hold */
@media (max-width: 839.98px) { .co-side[data-bare] { display: none; } }
/* صفحة الدفع: المبلغ قيل في بطاقته — الشريط زرّ واحد بعرضه */
.co-side[data-solo] { padding-inline: var(--s-2); }
.co-side[data-solo] .co-sum-action { flex: 1; }
.co-side[data-solo] .co-go { width: 100%; }
.co-side[data-variant="card"] { display: none; }
.co-sum-item, .co-sum-rows, .co-sum-foot { display: none; }
.co-sum-total { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.co-sum-label { font: var(--t-caption); color: var(--text-2); }
.co-sum-total > b { font: var(--t-title-3); font-weight: 800; color: var(--text); animation: co-sum-pop .4s var(--ease-back); transform-origin: 100% 50%; }
[dir="ltr"] .co-sum-total > b { transform-origin: 0 50%; }
.co-sum-none { font: var(--t-callout-strong); color: var(--text-3); }
.co-sum-sub { font: var(--t-caption); color: var(--text-3); white-space: nowrap; }
.co-sum-action { flex: none; }
.co-go { min-width: 128px; }
.co-go > svg { width: 18px; height: 18px; }
/* زرّ الشريط بارتفاع الضابط العادي (44px) لا الكبير — الشريط لا يعلو المحتوى */
.co-side .ui-btn-lg { --h: var(--control); padding-inline: var(--s-5); font: var(--t-body-strong); border-radius: var(--r-2); }
/* «متابعة»: السهم إلى الأمام (يسار الصفحة العربية) بعد الكلمة */
.co-next > svg { width: 18px; height: 18px; transform: scaleX(-1); transition: transform .35s var(--ease-back); }
[dir="ltr"] .co-next > svg { transform: none; }
@media (hover: hover) { .co-next:hover:not(:disabled) > svg { transform: scaleX(-1) translateX(-4px); } }

.co-sum-pic { position: relative; display: grid; place-items: center; flex: none; width: 52px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface-3); color: var(--gray-4); }
.co-sum-pic > img { width: 100%; height: 100%; object-fit: cover; }
.co-sum-pic > svg { width: 22px; height: 22px; }
.co-sum-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-sum-name > b { font: var(--t-body-strong); overflow-wrap: anywhere; }
.co-sum-name > span { font: var(--t-callout); color: var(--text-2); overflow-wrap: anywhere; }

/* الجوال في صفحتي الدفع: المنتج والإجمالي سطراً واحداً */
/* ليس بطاقة: بلا إطار ولا ظلّ ولا خلفية بيضاء — رأس مسطّح فوق خطّ متقطّع كرأس فاتورة، فلا يشبه صفوف طرق الدفع تحته */
.co-mini { display: flex; align-items: flex-start; gap: var(--s-3); padding: 0 var(--s-1) var(--s-5); border-bottom: 1.5px dashed var(--border-strong); }
.co-mini > .co-sum-name { flex: 1; gap: 2px; }
.co-mini .co-sum-pic { width: 48px; border-radius: var(--r-2); box-shadow: 0 0 0 1px var(--border); }
.co-mini-total { flex: none; align-self: center; font: var(--t-title-3); font-weight: 800; color: var(--accent-text); }
/* ما كتبه المستخدم (معرّف اللاعب، الخيار، التواصل): سطر صغير لكل منها تحت الباقة */
.co-mini-rows { display: flex; flex-direction: column; gap: 2px; margin: var(--s-1) 0 0; padding: 0; }
.co-mini-rows > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2); min-width: 0; font: var(--t-caption); }
.co-mini-rows dt { flex: none; color: var(--text-2); }
.co-mini-rows dt::after { content: ":"; }
.co-mini-rows dd { margin: 0; min-width: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

@container co (min-width: 840px) {
  .buy.co-buy { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); grid-template-areas: "hero side" "main side"; grid-template-rows: auto 1fr; column-gap: var(--s-8); row-gap: var(--s-4); }
  .buy.co-checkout { grid-template-areas: "main side"; grid-template-rows: auto; }
  .buy.co-buy { min-height: 0; }
  .co-buy > .co-side { align-self: start; }
  .co-side, .co-side[data-variant="card"] { position: sticky; top: var(--shell-offset, 112px); bottom: auto; align-self: start; display: flex; flex-direction: column; align-items: stretch; gap: var(--s-4);
    margin: 0; padding: var(--s-5); border-radius: 28px; border: 1px solid var(--border); box-shadow: var(--shadow-2); animation: co-side-in .55s var(--ease-emph) .1s backwards; }
  .co-sum-item { display: flex; align-items: center; gap: var(--s-3); }
  .co-sum-rows { display: flex; flex-direction: column; gap: var(--s-2); margin: 0; padding: var(--s-3) 0 0; border-top: 1px solid var(--border); }
  .co-sum-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); min-width: 0; }
  .co-sum-rows dt { flex: none; font: var(--t-callout); color: var(--text-2); }
  .co-sum-rows dd { margin: 0; min-width: 0; font: var(--t-callout-strong); text-align: end; overflow-wrap: anywhere; }
  .co-sum-total { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: 2px; padding-top: var(--s-3); border-top: 1px solid var(--border); }
  .co-sum-total > b { font: var(--t-title-2); font-weight: 800; }
  .co-side[data-solo] { padding: var(--s-5); }
  .co-sum-sub { grid-column: 1 / -1; }
  .co-sum-action > * { width: 100%; }
  .co-sum-foot { display: block; margin: 0; font: var(--t-caption); color: var(--text-2); text-align: center; }
  .co-sum-foot .link { display: inline; min-height: 0; font-weight: 700; }
  .co-mini { display: none; }
}
@keyframes co-side-in { from { opacity: 0; transform: translate3d(-18px, 0, 0); } }
[dir="ltr"] .co-side { animation-name: co-bar-up; }

/* ───── قبل اللمسة الواحدة: الكمية والمعرّف (BuyPanel) ───── */
.co-side { flex-wrap: wrap; }
.co-sum-note { order: -1; flex: 1 0 100%; margin: 0; }
@container co (min-width: 840px) { .co-sum-note { order: 0; } }
/* «طلبك جاهز»: عاد إلى المنتج بعد إضافة الرصيد */
.buy-ready { align-items: center; background: var(--success-soft); color: var(--text); animation: ready-in .6s var(--ease-back) backwards; }
.buy-ready > .success-wrap, .order-ready > .success-wrap { flex: none; }
.buy-ready .success-check, .order-ready .success-check { color: var(--teal); }
@keyframes ready-in { from { opacity: 0; transform: translate3d(0, -10px, 0) scale(.96); } }
/* الشريط نفسه في صفحات الحساب الأخرى حين يكفي الرصيد (components/OrderReady.jsx) */
.order-ready { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  border-radius: 20px; background: var(--surface); border: 1.5px solid var(--teal); box-shadow: var(--shadow-2); animation: ready-in .6s var(--ease-back) backwards; }
.order-ready-text { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font: var(--t-callout); color: var(--text-2); }
.order-ready-text > b { font: var(--t-body-strong); color: var(--text); }
.order-ready-go, .order-ready-x { flex: none; }
/* «صحّح المعرّف وأعد الإرسال» (components/FixId.jsx): بطاقة السعر الجديد نفسها (offer.css)، والحقل يظهر حين تُفتح */
.fix-id-form { display: flex; flex-direction: column; gap: var(--s-4); animation: co-rise .4s var(--ease-emph) backwards; }
@media (prefers-reduced-motion: reduce) {
  .buy-ready, .order-ready, .fix-id-form { animation: none !important; }
}

/* ───── ظهور الخطوة التالية: تصعد وتكبر، ورقمها «يُشحن» ───── */
.co-buy .buy-form > [data-fresh] { animation: co-reveal .6s var(--ease-emph) backwards; animation-delay: 0s; }
.co-buy .buy-form > [data-fresh] .buy-step-n { animation: co-num .55s var(--ease-back) .12s backwards; }
@keyframes co-reveal { from { opacity: 0; transform: translate3d(0, 28px, 0) scale(.96); } }
@keyframes co-num { from { opacity: 0; transform: scale(.6); } }
.co-buy .order-fields > * { animation: co-field .5s var(--ease-emph) backwards; animation-delay: 0s; }
@keyframes co-field { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
/* the entrances once kept in motion.css, under this file's own names */
@keyframes co-rise { from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes co-bar-up { from { opacity: 0; transform: translateY(calc(100% + 24px)); } }
@keyframes co-sum-pop { from { opacity: .3; transform: translateY(6px) scale(.9); } }
@keyframes co-pic-pop { from { opacity: 0; transform: scale(.85); } }

/* ───── السعر تغيّر قبل التأكيد (OrderSummary.PriceNotice): السعران في جملة واحدة وزرّان ─────
   يدخل بقفزة صغيرة وحافّة بلون التنبيه تتوهّج مرّة واحدة، والسعر الجديد ينبض مرّة: يُرى قبل أن يُضغط شيء */
.price-ask { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-3); background: var(--surface);
  border: 1.5px solid var(--warning-text); box-shadow: var(--shadow-1);
  animation: co-ask-in .5s var(--ease-back) backwards, co-ask-glow 1.4s var(--ease-out) .35s 1 backwards; }
.price-ask-text { margin: 0; font: var(--t-body); color: var(--text); }
.price-ask-text b { display: inline-block; font-weight: 800; color: var(--warning-text); animation: co-ask-new .6s var(--ease-back) .3s backwards; }
.price-ask-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.price-ask-actions > .ui-btn { flex: 1 1 160px; }
.co-amount > .price-ask { align-self: stretch; text-align: start; }
@keyframes co-ask-in { from { opacity: 0; transform: translate3d(0, -10px, 0) scale(.96); } }
@keyframes co-ask-glow {
  0% { box-shadow: var(--shadow-1), 0 0 0 0 color-mix(in srgb, var(--warning-text) 40%, transparent); }
  100% { box-shadow: var(--shadow-1), 0 0 0 10px color-mix(in srgb, var(--warning-text) 0%, transparent); }
}
@keyframes co-ask-new { from { opacity: 0; transform: scale(.6); } 60% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .price-ask, .price-ask-text b { animation: none !important; } }

/* ───── رأس الخطوة: رجوع · العنوان · ثلاث شرطات (الطلب ← طريقة الدفع ← الدفع) ───── */
.co-head { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.co-back { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-1); color: var(--text); transition: background var(--dur-1), transform var(--dur-2) var(--ease-out); }
.co-back > svg { width: 18px; height: 18px; }
[dir="ltr"] .co-back > svg { transform: scaleX(-1); }
.co-back:hover { background: var(--surface-2); }
.co-back:active { transform: scale(.92); }
.co-title { flex: 1; min-width: 0; margin: 0; font: var(--t-title-3); font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; animation: co-rise .45s var(--ease-emph) .05s backwards; }
@container co (min-width: 640px) { .co-title { font: var(--t-title-2); } }
.co-steps { display: flex; gap: var(--s-1); flex: none; }
.co-steps > i { width: 14px; height: 4px; border-radius: 2px; background: var(--border-strong); transform-origin: 100% 50%; }
.co-steps > i[data-on] { background: var(--accent); }
.co-steps > i[data-on]:is(:last-child, :has(+ i:not([data-on]))) { animation: co-line .6s var(--ease-emph) .1s backwards; }
[dir="ltr"] .co-steps > i { transform-origin: 0 50%; }
@keyframes co-line { from { transform: scaleX(0); } }

/* ───── طريقة الدفع: صفوف كبيرة، كل صفّ يفتح صفحة الدفع بها ───── */
.co-methods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
@container co (min-width: 560px) { .co-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); } }
.co-methods > li { animation: co-field .5s var(--ease-emph) backwards; animation-delay: calc(min(var(--i, 0), 8) * 50ms + 80ms); }
.co-method { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px; padding-block: var(--s-2); padding-inline: var(--s-3) var(--s-4); border-radius: var(--r-4); text-align: start;
  background: var(--surface); border: 1.5px solid var(--border); box-shadow: var(--shadow-1);
  transition: border-color var(--dur-1), background var(--dur-1), transform var(--dur-2) var(--ease-out); }
.co-method .gp-method-img { width: 44px; height: 44px; border-radius: var(--r-2); flex: none; }
.co-method-name { flex: 1; min-width: 0; font: var(--t-body-strong); overflow-wrap: anywhere; }
.co-method > svg { width: 18px; height: 18px; flex: none; color: var(--text-3); transform: scaleX(-1); transition: transform .35s var(--ease-back), color var(--dur-1); }
[dir="ltr"] .co-method > svg { transform: none; }
.co-method[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.co-method:active { transform: scale(.98); }
@media (hover: hover) {
  .co-method:hover { border-color: var(--accent); }
  .co-method:hover > svg { color: var(--accent-text); transform: scaleX(-1) translateX(-4px); }
}
.co-method:focus-visible { box-shadow: var(--focus); }
/* not available now: faded, «غير متاح» where the arrow was, never tapped (as in SyriaProxy) */
.co-method:disabled { opacity: .6; cursor: default; pointer-events: none; box-shadow: none; }
.co-method-off { flex: none; font: var(--t-caption); color: var(--text-2); }

/* ───── الدفع: المبلغ أولاً — العنوان، الرقم بوحدته، العملة. نفس الكلمات بكل عملة؛ يتغيّر الرقم والوحدة فقط ───── */
.co-amount { align-items: center; text-align: center; gap: var(--s-3); border: 1.5px dashed var(--accent); }
.co-amount .co-cur { margin-top: var(--s-1); }
.co-amount .gp-amount-value { min-height: 36px; font: var(--t-title-1); font-weight: 800; animation: co-num-pop .45s var(--ease-back); }
@keyframes co-num-pop { from { opacity: .2; transform: translateY(8px) scale(.9); } }
.co-amount .co-cur { width: min(100%, 288px); }
.co-amount > .field-error { justify-content: center; }
.co-amount > .field-error .link { display: inline; min-height: 0; font-weight: 700; color: inherit; }
.gp-rate-note { align-self: stretch; text-align: start; }
.co-blocks .pay-blocks { margin: 0; }
/* the product page and the payment pages: the cards breathe (20px inside, 16px between what they hold; 24px on wide pages) and the
   payment blocks keep at least 16px between them, whatever smaller gap the method was saved with */
.co-buy > .co-main > .buy-step { gap: var(--s-4); padding: var(--s-5); }
@container co (min-width: 640px) { .co-buy > .co-main > .buy-step { padding: var(--s-6); } }
.co-checkout .pay-blocks { gap: max(var(--pb-gap, var(--s-4)), var(--s-4)); }
.co-buy .order-fields { gap: var(--s-5); }
/* the narrow phone (320px): every pixel to the one-line address */
@media (max-width: 374.98px) { .co-checkout .co-main > .co-blocks { padding-inline: var(--s-3); } }
.co-blocks > .field-error .link { display: inline; min-height: 0; font-weight: 700; color: inherit; }
.co-note { background: var(--accent-soft); color: var(--text); }
.co-main > .buy-step { animation: co-rise .45s var(--ease-emph) backwards; }
.co-main > .buy-step:nth-of-type(2) { animation-delay: 70ms; } .co-main > .buy-step:nth-of-type(n+3) { animation-delay: 130ms; }
.co-main .buy-note .link { display: inline; min-height: 0; color: inherit; font-weight: 700; }

/* ═══════════ متابعة الطلب (/track/:token) ═══════════
   كان .rec.track: ‎.track جعل الشبكة عموداً مرناً، فصارت بطاقة المنتج اللاصقة تمرّ فوق «حالة طلبك». الآن شبكة
   بعمودين حقيقيين: البطاقة لاصقة داخل عمودها فقط. */
.trk-wrap { max-width: 1080px; min-width: 0; }
.trk { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main"; gap: var(--s-4); align-items: start; }
.trk-main { grid-area: main; display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.trk-main > * { animation: co-rise .45s var(--ease-emph) backwards; }
.trk-main > :nth-child(2) { animation-delay: 70ms; } .trk-main > :nth-child(n+3) { animation-delay: 130ms; }

.trk-side { grid-area: side; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); animation: co-rise .45s var(--ease-emph) backwards; }
.trk-pic { display: grid; place-items: center; width: 48px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface-3); color: var(--gray-4); }
.trk-pic > img { width: 100%; height: 100%; object-fit: cover; }
.trk-pic > svg { width: 24px; height: 24px; }
.trk-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trk-name { font: var(--t-body-strong); overflow-wrap: anywhere; }
.trk-pack { font: var(--t-callout); color: var(--text-2); overflow-wrap: anywhere; }

.trk-status { gap: var(--s-4); }
.trk-head { display: flex; align-items: center; gap: var(--s-4); }
.trk-head-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trk-head h1 { font: var(--t-title-3); font-weight: 700; margin: 0; }
@container co (min-width: 640px) { .trk-head h1 { font: var(--t-title-2); } }
.trk-head p { margin: 0; font: var(--t-callout); color: var(--text-2); }
.trk-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-3); background: var(--accent-soft); color: var(--accent-text);
  animation: co-num .6s var(--ease-back) .1s backwards; }
.trk-badge > svg { width: 22px; height: 22px; }
.trk-head .success-check { color: var(--teal); }
.trk-status[data-tone="bad"] .trk-badge { background: var(--danger-soft); color: var(--danger-text); }
.trk-status[data-tone="bad"] { border-color: var(--danger); }
.trk-code { background: var(--surface); border: 1.5px dashed var(--accent); box-shadow: var(--shadow-1); }
.trk-save { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.trk-save-text { flex: 1 1 220px; min-width: 0; font: var(--t-callout); color: var(--text-2); }
.trk-save-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.trk-saved { background: var(--accent-soft); color: var(--text); }

@container co (min-width: 840px) {
  .trk { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); grid-template-areas: "main side"; column-gap: var(--s-8); }
  .trk-side { position: sticky; top: var(--shell-offset, 112px); grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s-3); padding: var(--s-6) var(--s-5);
    border-radius: 28px; text-align: center; box-shadow: var(--shadow-2);
    background: var(--surface); }
  .trk-pic { width: 120px; border-radius: 32px; box-shadow: 0 0 0 1px var(--border), 0 10px 24px -14px rgb(0 0 0 / .35); animation: co-pic-pop .6s var(--ease-back) backwards; }
  .trk-what { align-items: center; }
  .trk-name { font: var(--t-title-3); font-weight: 800; }
  .trk-pack { display: inline-flex; align-items: center; min-height: 26px; padding: 2px var(--s-3); border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent-text); font: var(--t-caption-strong); }
}

@media (prefers-reduced-motion: reduce) {
  .co-side, .co-sum-total > b, .co-buy .buy-form > [data-fresh], .co-buy .buy-form > [data-fresh] .buy-step-n, .co-buy .order-fields > *,
  .co-steps > i, .co-title, .co-methods > li, .co-amount .gp-amount-value, .co-main > .buy-step, .trk-main > *, .trk-side, .trk-badge, .trk-pic { animation: none !important; }
  .co-next > svg, .co-method > svg, .co-back { transition: none; }
}

/* ═══════════ صفحة الطلب الواحدة (components/OrderView.jsx): نُفّذ جزئياً، ما أُعيد، «اشترِ مرة أخرى» ═══════════
   نُفّذ جزئياً ليس «مكتمل» ولا «مرفوض»: لون التنبيه، حلقة تمتلئ بقدر ما نُفّذ، وشريط بخانة لكل قطعة. */
.chip-part { background: var(--warning-soft); color: var(--success-text); }
@supports (background: linear-gradient(to left, red, blue)) { .chip-part { background: linear-gradient(to left, var(--success-soft) 45%, var(--warning-soft)); } }
[dir="ltr"] .chip-part { background: linear-gradient(to right, var(--success-soft) 45%, var(--warning-soft)); }
.chip-part::before { width: 8px; height: 8px; background: conic-gradient(currentColor 0 50%, transparent 0); box-shadow: inset 0 0 0 1.5px currentColor; }
.trk-status[data-tone="part"] { border-color: var(--warning-text); }
@supports (border-color: color-mix(in srgb, red 50%, blue)) { .trk-status[data-tone="part"] { border-color: color-mix(in srgb, var(--warning-text) 45%, transparent); } }
.track-line > li[data-state="part"] .track-dot { border-color: var(--warning-text); background: conic-gradient(var(--warning-text) 0 50%, var(--surface) 0); }

.ov-ring { position: relative; display: grid; place-items: center; flex: none; width: 56px; height: 56px; color: var(--warning-text);
  animation: co-num .6s var(--ease-back) .1s backwards; }
.ov-ring > svg { position: absolute; inset: 0; transform: rotate(-90deg) scaleY(-1); }
.ov-ring circle { fill: none; stroke-width: 5; }
.ov-ring-track { stroke: var(--warning-soft); }
.ov-ring-fill { stroke: currentColor; stroke-linecap: round; animation: ov-draw 1s var(--ease-emph) .25s backwards; }
.ov-ring > b { font: var(--t-caption-strong); font-weight: 800; direction: ltr; }
@keyframes ov-draw { from { stroke-dasharray: 0 var(--ov-c, 140); } }

.ov-bar { display: flex; gap: 4px; margin-top: 6px; max-width: 220px; }
.ov-bar > i { flex: 1 1 0; height: 8px; border-radius: 4px; background: repeating-linear-gradient(-45deg, var(--danger-soft) 0 3px, transparent 3px 6px);
  box-shadow: inset 0 0 0 1px var(--danger-soft); animation: ov-cell .45s var(--ease-back) backwards; animation-delay: calc(var(--i, 0) * 60ms + .2s); }
.ov-bar > i[data-on] { background: var(--success-text); box-shadow: none; }
@keyframes ov-cell { from { opacity: 0; transform: scaleX(.2); } }

.ov-refund { display: flex; gap: var(--s-2); align-items: flex-start; }
.ov-refund::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--success-text); box-shadow: 0 0 0 3px var(--success-soft); }
.ov-refund[data-to="none"]::before { background: var(--danger-text); box-shadow: 0 0 0 3px var(--danger-soft); }
.ov-refund[data-to="held"]::before { background: var(--warning-text); box-shadow: 0 0 0 3px var(--warning-soft); }

.ov-again { gap: var(--s-2); }
.ov-again > svg { width: 20px; height: 20px; flex: none; transition: transform .5s var(--ease-back); }
.ov-again:hover > svg, .ov-again:focus-visible > svg { transform: rotate(-180deg); }
.ov-again-note { background: var(--accent-soft); color: var(--text); }
.ov-again-note > svg { color: var(--accent-text); flex: none; }

@media (prefers-reduced-motion: reduce) {
  .ov-ring, .ov-ring-fill, .ov-bar > i { animation: none !important; }
  .ov-again > svg { transition: none; }
  .ov-code, .ov-copy, .keep, .keep-ic { animation: none !important; transition: none !important; }
}

/* ══════════ Gift-card codes: one row per code, its own copy button, «نسخ الكل» (components/CardCodes.jsx) ══════════ */
.ov-codes { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-4);
  background: var(--surface); border: 1.5px dashed var(--accent); box-shadow: var(--shadow-1); }
.ov-codes-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 32px; }
.ov-codes-label { margin: 0; font: var(--t-callout-strong); color: var(--text); }
.ov-codes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.ov-code { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); border-radius: var(--r-3);
  background: var(--surface-2); border: 1px solid transparent; transition: border-color .25s, background-color .25s;
  animation: ov-code-in .5s var(--ease-back) backwards; animation-delay: calc(var(--i, 0) * 70ms + .1s); }
.ov-code[data-done] { border-color: var(--accent); background: var(--accent-soft); }
.ov-code-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  font: var(--t-caption-strong); color: var(--text-2); }
.ov-code > code { flex: 1 1 auto; min-width: 0; font: 700 clamp(14px, 3.9vw, 17px)/1.35 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--text);
  letter-spacing: .01em; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; text-align: left; }
.ov-copy { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; min-width: 64px;
  padding: 0 var(--s-3); border-radius: 999px; border: 1px solid var(--accent-soft); background: var(--surface);
  font: var(--t-caption-strong); color: var(--accent-text); cursor: pointer; transition: transform .2s var(--ease-back), background-color .2s; }
.ov-copy:hover { background: var(--accent-soft); }
.ov-copy:active { transform: scale(.94); }
.ov-copy[data-done] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); animation: ov-pop .4s var(--ease-back); }
.ov-copy > svg { width: 14px; height: 14px; }
.ov-codes-hint, .keep-hint { display: flex; align-items: center; gap: 6px; margin: 0; font: var(--t-caption-strong); color: var(--warning-text);
  animation: ov-code-in .35s var(--ease-back) backwards; }
.ov-codes-hint > svg, .keep-hint > svg { width: 15px; height: 15px; flex: none; }
@keyframes ov-code-in { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.97); } }
@keyframes ov-pop { 40% { transform: scale(1.12); } }

/* «التواصل»: the masked address stays on one line (cut with «…» on a narrow phone), never broken mid-word */
.ov-contact { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: ltr; text-align: right; }

/* ══════════ «احفظ رابط طلبك» (pages/Track.jsx): the link alone opens the purchase ══════════
   A quiet card (2026-10-22): plain border, two secondary buttons side by side, «save it in an account» as its last line —
   it never outshouts what the page is for (pay, fix the id, copy the codes). */
.keep { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-4);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
  animation: ov-code-in .6s var(--ease-back) .15s backwards; }
.keep-head { display: flex; align-items: flex-start; gap: var(--s-3); }
.keep-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-3); background: var(--accent-soft); color: var(--accent-text);
  animation: keep-ic .8s var(--ease-back) .3s backwards; }
.keep-ic > svg { width: 22px; height: 22px; }
.keep[data-done] .keep-ic { animation: ov-pop .45s var(--ease-back); }
.keep-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.keep-text h2 { margin: 0; font: var(--t-body-strong); font-weight: 700; color: var(--text); }
.keep-text p { margin: 0; font: var(--t-callout); color: var(--text-2); }
.keep-link { display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-2); background: var(--surface-2); color: var(--text-2);
  font: 500 13px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; direction: ltr; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-user-select: all; user-select: all; cursor: text; }
.keep-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.keep-actions > .ui-btn { min-width: 0; gap: 6px; white-space: nowrap; }
.keep-actions svg { width: 17px; height: 17px; flex: none; }
.keep-copy[data-done] { animation: ov-pop .4s var(--ease-back); }
.keep-wa > svg { color: #25D366; }
/* the narrowest phones: the two buttons still share one line, a little tighter */
@container co (max-width: 300px) { .keep-actions > .ui-btn { padding-inline: var(--s-2); } }
.keep-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); margin: 0;
  padding-top: var(--s-3); border-top: 1px dashed var(--border-strong); font: var(--t-callout); color: var(--text-2); }
.keep-save-actions { display: inline-flex; align-items: center; gap: var(--s-2); }
.keep-save-actions > .link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.keep-save-actions > span { color: var(--text-3); }
@keyframes keep-ic { from { opacity: 0; transform: rotate(-35deg) scale(.5); } }

/* ══════════ USDT: we watch the chain (components/UsdtWatch.jsx) ══════════
   No «قمت بالتحويل»: a live radar says we are looking — a sweep turns, rings leave the coin — then «وصل X من Y» (amber)
   when part of it arrived, then the check. Transform/opacity only; still under «reduce motion». */
.uw { --uw: var(--accent); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-3) var(--s-4);
  padding: var(--s-4); border-radius: var(--r-4); background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--uw) 28%, var(--border)); }
.uw[data-state="part"] { --uw: #E0A800; background: var(--warning-soft); }
.uw[data-state="done"] { background: var(--success-soft); }
.uw-scope { position: relative; display: grid; place-items: center; width: 64px; height: 64px; }
.uw-radar { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; isolation: isolate; }
.uw-radar > i { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.uw-sweep { background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--uw) 45%, transparent) 100%);
  animation: uw-turn 1.8s linear infinite; -webkit-mask: radial-gradient(circle, #000 0 70%, transparent 71%); mask: radial-gradient(circle, #000 0 70%, transparent 71%); }
.uw-ring { border: 2px solid var(--uw); opacity: 0; transform: scale(.45); animation: uw-ring 2.4s var(--ease-out) infinite; }
.uw-ring:nth-of-type(3) { animation-delay: .8s; }
.uw-ring:nth-of-type(4) { animation-delay: 1.6s; }
.uw-coin { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--uw); color: #fff;
  font: 800 19px/1 var(--font); box-shadow: 0 4px 14px color-mix(in srgb, var(--uw) 45%, transparent); animation: uw-beat 2.4s var(--ease-out) infinite; }
.uw-done { display: grid; place-items: center; }
.uw-done .success-check { color: var(--teal); }
.uw-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uw-title { font: var(--t-body-strong); color: var(--text); }
.uw-sub { font: var(--t-callout); color: var(--text-2); }
.uw[data-state="part"] .uw-title { color: var(--warning-text); }
.uw-dots { display: inline-flex; gap: 3px; margin-inline-start: 4px; vertical-align: middle; }
.uw-dots > i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: uw-dot 1.2s ease-in-out infinite; }
.uw-dots > i:nth-child(2) { animation-delay: .15s; }
.uw-dots > i:nth-child(3) { animation-delay: .3s; }
.uw-help { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--s-2); }
.uw-help-link { align-self: flex-start; font: var(--t-callout-strong); }
.uw-form { display: flex; flex-direction: column; gap: var(--s-2); overflow: hidden; }
.uw-form > .ui-btn { align-self: flex-start; }
.uw-form > .ui-btn > svg { width: 16px; height: 16px; }
.uw-live { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: uw-live 1.4s ease-in-out infinite; }
@keyframes uw-turn { to { transform: rotate(360deg); } }
@keyframes uw-ring { 0% { opacity: .7; transform: scale(.45); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes uw-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(.98); } }
@keyframes uw-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes uw-live { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
[dir="rtl"] .uw-sweep { animation-direction: reverse; }
@supports not (background: conic-gradient(red, blue)) { .uw-sweep { display: none; } }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .uw { border-color: var(--border); }
  .uw-sweep { display: none; }
  .uw-coin { box-shadow: none; }
}
@media (max-width: 360px) { .uw { padding: var(--s-3); gap: var(--s-2) var(--s-3); } .uw-scope, .uw-radar { width: 52px; height: 52px; } }

/* USDT: what usually loses the money (another network, an exchange's fee taken from the amount) — two quiet lines */
.uw-notes { display: flex; flex-direction: column; gap: var(--s-2); margin: 0; padding: var(--s-3) var(--s-4); list-style: none;
  border-radius: var(--r-3); background: var(--surface-2); color: var(--text-2); font: var(--t-callout); }
.uw-notes > li { display: flex; align-items: flex-start; gap: var(--s-2); }
/* quiet lines, the amber stays on the icons: the live box under them is the one that turns amber when part of it arrived */
.uw-notes > li > svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--warning-text); }
.uw-notes b { color: var(--text); }
.uw-notes b { font-weight: 800; }
.track-deposit > .uw-notes { margin-block: var(--s-3); }
/* «نسخ المبلغ» under the USDT amount (UsdtWatch.CopyAmount) */
.uw-copy { min-height: 40px; }
.gp-amount > .uw-copy { margin-top: var(--s-1); }
/* part of it in: «المتبقي» is the big number (what arrived of what is said once, in the live box) — it pulses as it changes */
.co-amount .gp-amount-value[data-flash] { animation: co-num-pop .45s var(--ease-back), uw-left 1.2s var(--ease-out) .45s; }
@keyframes uw-left { 30% { transform: scale(1.06); } }

/* a purchase whose answer was lost: asked again with the same key — said while it is */
.co-wait { align-items: center; background: var(--accent-soft); color: var(--accent-text); font: var(--t-callout-strong); animation: co-rise .35s var(--ease-emph) backwards; }
.co-wait > .uw-live { flex: none; }
/* the order page could not ask for a while */
.trk-stale { align-items: center; background: var(--warning-soft); color: var(--warning-text); animation: co-rise .35s var(--ease-emph) backwards; }
.trk-stale > svg { width: 18px; height: 18px; flex: none; }
.trk-stale .link { display: inline; min-height: 0; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .co-wait, .trk-stale, .co-amount .gp-amount-value[data-flash] { animation: none !important; }
  .uw-sweep, .uw-ring, .uw-coin, .uw-dots > i, .uw-live { animation: none !important; }
  .uw-ring:nth-of-type(2) { opacity: .5; transform: scale(.9); }
}
