/* ══════════ تذييل المتجر (components/Footer.jsx) ══════════
   شريط رفيع كالمواقع العالمية (المالك 2026-10-16): على الشاشات العريضة سطر واحد — الشعار، الخصوصية · الشروط، وفي الطرف
   المقابل سطر الحقوق وأزرار التواصل الصغيرة؛ على الجوال ثلاثة أسطر قصيرة (الشعار والأزرار، السياستان، الحقوق). على حافّته
   العليا خطّ رفيع بألوان الشعار يُرسم من الوسط حين يصل إليه التمرير. لمن سجّل الدخول لا تذييل: المحتوى نفسه في «حول محطة
   بلس» آخر أقسام الشريط الجانبي (AboutNav، أسفل). */
/* لون التذييل: أيضاً لون أرضية الصفحة حين يقترب التمرير من آخرها (html[data-end] في store.css). --sf-h: ارتفاعه تقريباً */
:root { --footer-bg: color-mix(in srgb, var(--brand-teal) 4%, var(--surface-2)); --sf-h: 82px; }
@media (max-width: 639.98px) { :root { --sf-h: 126px; } }
.site-footer {
  position: relative; z-index: 1; margin-top: var(--s-10); background: var(--footer-bg);
  border-top: 1px solid var(--border);
}
.site-footer.in-auth, .site-footer.in-legal { margin-top: 0; }
.main > .content { flex: 1 0 auto; }
/* الصفحات القائمة بذاتها (الدخول والتسجيل والاستعادة، السياسات، 404، الصيانة): التذييل في أسفل الشاشة الأولى، لا تحتها */
.auth:has(+ .site-footer), .legal:has(+ .site-footer), .maint:has(+ .site-footer) { min-height: calc(100dvh - var(--sf-h)); }

/* خطّ بألوان الشعار: الفيروزي في الوسط ويذوب نحو الطرفين في الكهرماني والأحمر */
.sf-line {
  position: absolute; inset: -1px 0 auto; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--brand-red) 18%, var(--brand-amber) 34%, var(--brand-teal) 50%,
                                     var(--brand-amber) 66%, var(--brand-red) 82%, transparent);
  opacity: .8;
}

.sf-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-6);
  max-width: calc(var(--page-max, 1120px) + 2 * var(--gutter, 16px)); margin-inline: auto;
  padding: var(--s-5) var(--gutter, 16px) calc(var(--s-5) + env(safe-area-inset-bottom));
  font: var(--t-callout); color: var(--text-2);
}
.sf-logo { display: inline-flex; align-items: center; min-height: 40px; flex: none; border-radius: var(--r-2); transition: transform .35s var(--ease-emph, ease); }
.sf-logo img { height: 24px; width: auto; display: block; }
@media (hover: hover) { .sf-logo:hover { transform: translateY(-1px) rotate(-1.5deg); } }

/* السياستان جنباً إلى جنب، بنقطة بينهما */
.sf-links { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.sf-links a {
  position: relative; display: inline-flex; align-items: center; min-height: 40px; color: var(--text-2); font-weight: 600;
  transition: color var(--dur-2);
}
/* الخطّ تحت الرابط يمتدّ من المنتصف */
.sf-links a::after {
  content: ""; position: absolute; inset: auto 0 8px; height: 1.5px; border-radius: 2px; background: var(--brand-teal);
  transform: scaleX(0); transition: transform .3s var(--ease-emph, ease);
}
@media (hover: hover) { .sf-links a:hover { color: var(--text); } .sf-links a:hover::after { transform: scaleX(1); } }
.sf-links a:focus-visible::after { transform: scaleX(1); }
.sf-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); flex: none; }

/* الحقوق ثم الأزرار في الطرف المقابل */
.sf-copy { margin: 0; margin-inline-start: auto; font: var(--t-caption); color: var(--text-2); }
.sf-copy .num { display: inline; }

/* مواقع التواصل: دوائر صغيرة 32px (منطقة اللمس 44px حولها) بأيقونة بلون الشبكة، تمتلئ بلونها حين يُمرَّر عليها */
.sf-social { display: flex; align-items: center; gap: var(--s-3); margin: 0; padding: 0; list-style: none; flex: none; }
.sf-soc {
  --net: var(--accent);
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); color: var(--net); box-shadow: 0 0 0 1px var(--border);
  transition: background var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform .3s var(--ease-emph, ease);
}
.sf-soc::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.sf-soc > svg { width: 16px; height: 16px; transition: transform .45s var(--ease-emph, ease); }
.sf-soc[data-net="instagram"] { --net: #E1306C; --net-fill: radial-gradient(circle at 30% 107%, #FDD15A 0%, #FD8D32 22%, #E1306C 52%, #B92DB6 78%, #5B51DB 100%); }
.sf-soc[data-net="whatsapp"] { --net: #1DA851; --net-fill: #25D366; }
.sf-soc[data-net="telegram"] { --net: #1B8BC6; --net-fill: #229ED9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf-soc[data-net="instagram"] { --net: #F0588F; } :root:not([data-theme="light"]) .sf-soc[data-net="whatsapp"] { --net: #32D774; } :root:not([data-theme="light"]) .sf-soc[data-net="telegram"] { --net: #47B4E8; } }
:root[data-theme="dark"] .sf-soc[data-net="instagram"] { --net: #F0588F; }
:root[data-theme="dark"] .sf-soc[data-net="whatsapp"] { --net: #32D774; }
:root[data-theme="dark"] .sf-soc[data-net="telegram"] { --net: #47B4E8; }
@media (hover: hover) {
  .sf-soc:hover { background: var(--net-fill, var(--net)); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px -8px var(--net); }
  .sf-soc:hover > svg { transform: rotate(-10deg) scale(1.08); }
}
.sf-soc:active { transform: scale(.9); }
.sf-soc:focus-visible { box-shadow: var(--focus); }

/* الجوال: الشعار والأزرار في سطر، تحته السياستان، ثم الحقوق — كلها من بداية السطر */
@media (max-width: 639.98px) {
  .sf-bar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo social" "links links" "copy copy";
    gap: 0 var(--s-4); align-items: center; padding-block: var(--s-3) calc(var(--s-4) + env(safe-area-inset-bottom));
  }
  .sf-logo { grid-area: logo; justify-self: start; min-height: 44px; }
  .sf-links { grid-area: links; min-width: 0; }
  .sf-links a { min-height: 40px; }
  .sf-copy { grid-area: copy; margin: 0; }
  .sf-social { grid-area: social; }
}

/* الحركة: الخطّ يُرسم من الوسط، ثم يصعد الشعار والروابط والسطر الأخير تباعاً، والأزرار واحداً بعد الآخر */
.reveal-on .site-footer[data-revealed] .sf-line { animation: sf-draw 1.1s var(--ease-emph, ease) backwards; }
.reveal-on .site-footer[data-revealed] .sf-bar > :not(.sf-social) { animation: m-rise .6s var(--ease-emph, ease) backwards; }
.reveal-on .site-footer[data-revealed] .sf-bar > :nth-child(1) { animation-delay: .1s; }
.reveal-on .site-footer[data-revealed] .sf-bar > :nth-child(2) { animation-delay: .16s; }
.reveal-on .site-footer[data-revealed] .sf-bar > :nth-child(3) { animation-delay: .22s; }
.reveal-on .site-footer[data-revealed] .sf-social > li { animation: sf-pop .55s var(--ease-emph, ease) backwards; animation-delay: calc(.26s + var(--n, 0) * 70ms); }
.sf-social > li:nth-child(2) { --n: 1; } .sf-social > li:nth-child(3) { --n: 2; } .sf-social > li:nth-child(4) { --n: 3; } .sf-social > li:nth-child(5) { --n: 4; }
@keyframes sf-draw { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: .8; } }
@keyframes sf-pop { from { opacity: 0; transform: scale(.6) rotate(-20deg); } }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .site-footer[data-revealed] .sf-line, .reveal-on .site-footer[data-revealed] .sf-bar > :not(.sf-social),
  .reveal-on .site-footer[data-revealed] .sf-social > li { animation: none; }
  .sf-logo, .sf-links a, .sf-links a::after, .sf-soc, .sf-soc > svg { transition: none; }
}

/* ══════════ «حول محطة بلس» — آخر الشريط الجانبي وآخر صفحة القائمة لمن سجّل الدخول (Footer.jsx: AboutNav) ══════════
   في الشريط الجانبي: سطر صغير كتذييلات الأشرطة الجانبية في المواقع الكبيرة — الخصوصية · الشروط، ثم الأزرار والحقوق — كي
   يبقى المظهر وتسجيل الخروج في متناول اليد. في صفحة القائمة (الجوال): بطاقة كباقي البطاقات، الخصوصية والشروط صفّان
   بأيقونتين، وتحتهما الأزرار والحقوق. */
.nav-about { display: flex; flex-direction: column; min-width: 0; }
.nav-about > .nav-group { margin: 0; }
.nav-about .about-foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-2) var(--s-3) 0; }
.nav-about .about-copy { margin: 0; font: var(--t-caption); color: var(--text-2); }

.sidebar .nav-about { padding-bottom: var(--s-1); }
.sidebar .nav-about > .nav-group { padding-top: var(--s-2); }
.sidebar .about-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); padding: 0 var(--s-3); }
.sidebar .about-links .nav-item {
  height: 32px; padding: 0; gap: 0; border-radius: var(--r-1, 4px); background: none;
  font: var(--t-caption-strong); color: var(--text-2);
}
.sidebar .about-links .nav-item + .nav-item::before { content: "·"; margin-inline-end: var(--s-2); color: var(--text-3); font-weight: 700; }
.sidebar .about-links .nav-ic { display: none; }
@media (hover: hover) { .sidebar .about-links .nav-item:hover { background: none; color: var(--text); } .sidebar .about-links .nav-item:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; } }

.menu-page > .nav-about {
  gap: 2px; padding: var(--s-2) var(--s-2) var(--s-4); border-radius: 24px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-1); animation-delay: 250ms;
}
.menu-page .about-links { display: flex; flex-direction: column; gap: 2px; }

/* ══════════ ملفات تعريف الارتباط (components/CookieConsent.jsx) ══════════
   بطاقة صغيرة أسفل الشاشة مرّة واحدة لكل متصفّح، شكلاً فقط. على الحاسوب في الزاوية السفلية في بداية السطر (الإشعارات
   في الزاوية المقابلة)، وعلى الجوال بعرض الشاشة داخل هامشها فوق شريط الإيماءات. تصعد من أسفل بنابض والبسكويتة تتدحرج
   إلى مكانها؛ تخرج أسرع مما تدخل. «تقليل الحركة»: ظهور واختفاء بالشفافية فقط. */
.cc {
  position: fixed; z-index: 55; inset-inline: var(--s-4); bottom: calc(var(--s-4) + env(safe-area-inset-bottom));
  max-width: 400px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-4) var(--s-3);
  padding: var(--s-4); border-radius: var(--r-4); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-3);
  animation: cc-in .7s var(--ease-emph, ease) backwards;
}
@media (min-width: 640px) { .cc { inset-inline: var(--s-6) auto; bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); } }
.cc-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--warning-soft); color: var(--warning-text); }
.cc-ic > svg { width: 22px; height: 22px; animation: cc-roll .8s var(--ease-emph, ease) .2s backwards; }
.cc-text { font: var(--t-callout); color: var(--text); }
.cc-link { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.cc-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.cc-actions > .ui-btn { min-width: 0; }
.cc[data-out] { animation: cc-out .24s cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
@keyframes cc-in { from { opacity: 0; transform: translate3d(0, calc(100% + 32px), 0) scale(.96); } }
@keyframes cc-roll { from { opacity: 0; transform: translateX(-14px) rotate(-160deg) scale(.5); } }
@keyframes cc-out { to { opacity: 0; transform: translate3d(0, 24px, 0) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .cc { animation: cc-fade .2s ease-out backwards; }
  .cc-ic > svg { animation: none; }
  .cc[data-out] { animation: cc-fade .16s ease-in reverse forwards; }
}
@keyframes cc-fade { from { opacity: 0; } }

html:has(.cc) { scroll-padding-bottom: 200px; }
/* a purchase's page (/track): a slim strip, and the page ends above it so the order is never under it */
.cc[data-compact] { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-3); padding: 10px 10px 10px 14px; border-radius: 18px; max-width: 460px; }
.cc[data-compact] .cc-text { font: var(--t-caption); color: var(--text-2); }
.cc[data-compact] .cc-actions { grid-column: auto; display: flex; gap: 6px; }
.cc[data-compact] .cc-actions > .ui-btn { min-height: 34px; padding-inline: 12px; }
html:has(.cc[data-compact]) .trk-wrap { padding-bottom: 96px; }  /* a field focused from the keyboard scrolls into view above the card, not under it */
