/* countdown.css — عداد انتهاء العرض (countdown.js).
   مكانين: (1) «تذكرة» راكبة على حرف كارت السعر من فوق في #offer — مابتزوّدش طول السكشن غير نص ارتفاعها.
           (2) سطر مضغوط جوّه الشريط العايم جنب السعر (على الموبايل فوق السعر — phone-shell.css).
   الأرقام tabular-nums (عرض ثابت = مفيش رقص ولا إزاحة)، والثواني بتنزل بحركة هادية (transform/opacity بس).
   الأرقام مستخبية لحد ما الـJS يحسبها (المكان محجوز من أول رسمة)، ومن غير JS العداد كله مش ظاهر. */

[data-cd][hidden] { display: none !important; }
@media (scripting: none) { [data-cd] { display: none !important; } }

.cd { font-variant-numeric: tabular-nums; }
.cd .cd__n { visibility: hidden; }
/* inherit مش visible: لو الشريط العايم مستخبي (visibility:hidden) الأرقام تستخبى معاه — visible كانت بتطلّعها لوحدها ورا التابات */
.cd.is-live .cd__n { visibility: inherit; }
.cd__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.cd__n { display: inline-block; }
.cd__n.is-tick { animation: cd-tick .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes cd-tick { from { transform: translateY(-.32em); opacity: .25; } to { transform: none; opacity: 1; } }

/* ===================== (1) كارت السعر ===================== */
/* الكارت بيوسّع من فوق بنص ارتفاع التذكرة بس — لو العداد مقفول بيرجع زي ما كان */
.fk__card:has(> .cd--card:not([hidden])) { padding-top: calc(1.3rem + 16px); }
.cd--card {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -62%);
  width: max-content; max-width: calc(100% - 28px);
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 5px 16px 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--tint-40);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .9), 0 0 0 4px var(--bg);
  line-height: 1.25; white-space: nowrap;
}
.cd--card .cd__lbl { font-size: .72rem; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.cd--card .cd__clock { display: flex; align-items: baseline; gap: 7px; }
.cd--card .cd__g { display: inline-flex; align-items: baseline; gap: 3px; }
.cd--card .cd__n { font-size: 1.08rem; font-weight: 800; color: var(--accent-txt); letter-spacing: .01em; }
.cd--card .cd__u { font-size: .68rem; font-weight: 600; color: var(--text-2); }
.cd--card .cd__sep { font-style: normal; font-weight: 700; color: var(--text-2); opacity: .55; transform: translateY(-1px); }
/* «الدفعة دي قفلت» (لحظة الصفر) */
.cd--card.is-closed .cd__lbl,
.cd--bar.is-closed .cd__lbl { color: var(--accent-txt); }
.cd.is-closed .cd__n { opacity: .45; }

:root[data-theme="light"] .cd--card {
  background: #FFFFFF; border-color: rgba(26, 30, 18, .22);
  box-shadow: 0 10px 24px -14px rgba(26, 26, 18, .45), 0 0 0 4px var(--bg);
}

/* ===================== (2) الشريط العايم ===================== */
.cd--bar {
  display: flex; flex-direction: column; justify-content: center;
  width: 7.9rem; padding-inline-start: .75rem;
  border-inline-start: 1px solid var(--glass-brd);
  line-height: 1.22; white-space: nowrap;
}
:root[lang="en"] .cd--bar { width: 7.4rem; }
.cd--bar .cd__lbl { height: 14px; line-height: 14px; font-size: .66rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.cd--bar .cd__clock { height: 20px; line-height: 20px; display: flex; align-items: baseline; gap: .3rem; font-size: .95rem; font-weight: 700; color: var(--accent-txt); }
.cd--bar .cd__day { display: inline-flex; align-items: baseline; gap: .15rem; }
/* الوحدة بعرض ثابت لكل لغة: الترجمة بتحصل بعد أول رسمة، فمن غيرها الساعة كانت بتتزق شوية */
.cd--bar .cd__u { display: inline-block; width: 1.75em; font-size: .66rem; font-weight: 600; color: var(--text-2); }
:root[lang="en"] .cd--bar .cd__u { width: .75em; }
.cd--bar .cd__hms { unicode-bidi: isolate; }
.cd--bar .cd__ico { display: none; }

/* الموبايل: سطر واحد صغير فوق السعر — أيقونة ساعة + «01 يوم 17:42:09» (الكلام الكامل للقارئ) */
@media (max-width: 767px) {
  html.phone-app #stickyBar .cd--bar {
    width: auto; min-width: 0; padding: 0; border: 0;
    flex-direction: row; align-items: center; line-height: 1.2;
  }
  html.phone-app #stickyBar .cd--bar .cd__lbl {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  }
  html.phone-app #stickyBar .cd--bar.is-closed .cd__lbl { position: static; width: auto; height: auto; margin: 0; clip: auto; clip-path: none; font-size: 11.5px; font-weight: 700; }
  html.phone-app #stickyBar .cd--bar.is-closed .cd__clock { display: none; }
  html.phone-app #stickyBar .cd--bar .cd__clock { height: 16px; line-height: 16px; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; }
  html.phone-app #stickyBar .cd--bar .cd__ico { display: block; width: 12px; height: 12px; flex: none; }
  html.phone-app #stickyBar .cd--bar .cd__u { font-size: 11px; }
  /* كارت السعر على الموبايل: مسافة فوقه للتذكرة */
  html.phone-app #offer .fk__card:has(> .cd--card:not([hidden])) { padding-top: 46px; margin-top: 30px; }
  html.phone-app #offer .cd--card { padding: 6px 14px 7px; }
  html.phone-app #offer .cd--card .cd__lbl { font-size: 12px; }
  html.phone-app #offer .cd--card .cd__n { font-size: 18px; }
  html.phone-app #offer .cd--card .cd__u { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cd__n.is-tick { animation: none; }
}
