/* وضح — صفحة تنزيل تطبيق أندرويد (‎/kashier/download/‎).
 *
 * تبني على ‎styles.css‎ ولا تعيد تعريف شيءٍ منه: الألوان والخطوط والبطاقات
 * والخطوات من هناك، وهنا ما يخصّ التنزيل وحده (بطاقة الإصدار، رمز QR،
 * التلميحات بحسب الجهاز). مُحمَّلة من هذه الصفحة فقط.
 */

/* ---------- تلميحات بحسب الجهاز ----------
   ‎download.js‎ يضع ‎is-android‎ أو ‎is-ios‎ أو ‎is-desktop‎ على ‎<html>‎.
   بلا JS تُخفى هذه التلميحات كلها، وما تحتاجه الصفحة لتعمل ظاهرٌ دونها. */
html:not(.is-android) [data-when="android"],
html:not(.is-ios)     [data-when="ios"],
html:not(.is-desktop) [data-when="desktop"] { display: none; }

/* ---------- شاشة التثبيت في الهيرو ---------- */

.dl-install { padding: 30px 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.dl-install__app { display: flex; align-items: center; gap: 14px; }
.dl-icon {
  width: 64px; height: 64px; border-radius: 18px; flex: none;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #FFF; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px -12px rgba(var(--brand-rgb), .8);
}
.dl-icon--tauri { background: linear-gradient(145deg, #E58A2B 0%, var(--warn) 100%); box-shadow: 0 10px 22px -12px rgba(201, 122, 30, .8); }
.dl-icon--sm { width: 48px; height: 48px; border-radius: 14px; }
.dl-install__name { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.dl-install__pub { font-size: .8125rem; color: var(--muted); }
.dl-install__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line-soft); }
.dl-install__facts > div { padding: 12px 4px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.dl-install__facts > div + div { border-inline-start: 1px solid var(--line-soft); }
.dl-install__facts b { font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-install__facts span { font-size: .71875rem; color: var(--muted); }
.dl-install__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  border-radius: 999px; background: var(--brand); color: #FFF; font-weight: 600; font-size: .9375rem;
}
.dl-install__note { display: flex; gap: 10px; align-items: flex-start; font-size: .78125rem; color: var(--ink-2); line-height: 1.65; padding: 12px 14px; background: var(--sand-deep); border-radius: 14px; }
.dl-install__note svg { flex: none; color: var(--brand); stroke-width: 2; }

/* ---------- سطر الإصدار تحت الزرّ ---------- */

.dl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .84375rem; color: var(--muted); }
.dl-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-meta [data-loading] { display: inline-block; width: 64px; height: .9em; border-radius: 6px; background: var(--line-soft); vertical-align: middle; animation: dl-pulse 1.2s ease-in-out infinite; }
@keyframes dl-pulse { 50% { opacity: .45; } }

/* ---------- رمز QR للزائر من الكمبيوتر ---------- */

.dl-qr { display: flex; align-items: center; gap: 18px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); max-width: 460px; }
.dl-qr__img { width: 116px; height: 116px; flex: none; border-radius: 12px; background: #FFF; border: 1px solid var(--line-soft); padding: 6px; display: flex; align-items: center; justify-content: center; }
.dl-qr__img img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.dl-qr__img:empty::before { content: ""; width: 60%; height: 60%; border-radius: 8px; background: var(--line-soft); animation: dl-pulse 1.2s ease-in-out infinite; }
.dl-qr__t { font-weight: 600; font-size: .96875rem; padding-bottom: 4px; }

.dl-hint { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: .90625rem; line-height: 1.75; }
.dl-hint svg { flex: none; margin-top: 3px; }
.dl-hint--warn { background: var(--warn-tint); color: var(--gold-ink); border: 1px solid var(--gold-edge); }
.dl-hint--info { background: var(--brand-tint); color: var(--brand-deep); border: 1px solid var(--brand-edge); }

/* ---------- بطاقتا التطبيقين ---------- */

.dl-app { display: flex; flex-direction: column; gap: 18px; }
.dl-app__top { display: flex; align-items: center; gap: 14px; }
.dl-app__top .h3 { font-size: 1.1875rem; }
.dl-app__grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-app__rows { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.dl-app__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .875rem; }
.dl-app__row span:first-child { color: var(--muted); }
.dl-app__row span:last-child { font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.dl-app__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.dl-app__actions .btn { flex: 1 1 180px; }
.dl-app[data-state="soon"] .dl-app__actions .btn--primary { background: var(--sand); color: var(--muted); box-shadow: none; pointer-events: none; }
.dl-app[data-state="soon"] [data-qr-toggle] { display: none; }
.dl-app__qr { display: none; justify-content: center; padding: 14px; border-radius: 14px; background: var(--sand-deep); }
.dl-app__qr.is-open { display: flex; }
.dl-app__qr img { width: 168px; height: 168px; background: #FFF; padding: 8px; border-radius: 12px; }

.dl-sha { font-size: .8125rem; color: var(--muted); }
.dl-sha summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.dl-sha summary::-webkit-details-marker { display: none; }
.dl-sha summary svg { transition: rotate var(--dur) var(--ease); }
.dl-sha[open] summary svg { rotate: 180deg; }
.dl-sha__box { margin-top: 10px; display: flex; gap: 8px; align-items: stretch; }
.dl-sha__box code { flex: 1 1 auto; min-width: 0; direction: ltr; text-align: left; font-size: .75rem; line-height: 1.6; padding: 8px 10px; background: var(--sand-deep); border-radius: 8px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); }
.dl-copy { flex: none; border: 1px solid var(--line-firm); background: var(--surface); border-radius: 8px; padding: 0 12px; font: inherit; font-size: .8125rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.dl-copy:hover { border-color: var(--muted-2); }

/* ---------- خطوات التثبيت: لقطات مصغّرة من أندرويد ---------- */

.dl-steps { counter-reset: none; }
.dl-shot {
  border-radius: 16px; background: var(--sand-deep); border: 1px solid var(--line-soft);
  padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: .8125rem;
}
.dl-shot__bar { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.dl-shot__bar svg { color: var(--muted); }
.dl-shot__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: 10px; color: var(--ink-2); }
.dl-toggle { width: 34px; height: 20px; border-radius: 999px; background: var(--brand); position: relative; flex: none; }
.dl-toggle::after { content: ""; position: absolute; top: 3px; inset-inline-end: 3px; width: 14px; height: 14px; border-radius: 50%; background: #FFF; }
.dl-shot__btns { display: flex; justify-content: flex-end; gap: 16px; padding: 2px 4px; font-weight: 700; color: var(--brand-deep); }
.dl-shot__btns span:first-child { color: var(--muted); font-weight: 600; }
.dl-shot__file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: 10px; }
.dl-shot__file b { font-weight: 600; color: var(--ink); direction: ltr; }
.dl-shot__file small { display: block; color: var(--muted); font-size: .71875rem; }

/* ---------- قائمة المشاكل ---------- */

.dl-trouble .flow__t { display: block; }
