/* ============================================================================
   Liquid Glass Bar — شريط التنقل السفلي بأسلوب iOS «الزجاج السائل» (الهاتف)
   يُستعمل في كل صفحات الموقع: التطبيق (#m-tabbar) والدردشة (.tabbar).
   الصفحة تحدد فقط: الموضع/الإظهار + المتغيرين --lgb-active و --lgb-inactive.
   الباقي هنا: الزجاج، العدسة المنزلقة، ارتداد الأيقونة، انتقال الألوان (250ms easeOutQuad).
   ========================================================================== */
.lgb {
  --lgb-active: #10b981;
  --lgb-inactive: #a1a1aa;
  --lgb-dur: 250ms;
  --lgb-ease: cubic-bezier(.25, .46, .45, .94);               /* easeOutQuad */
  --lgb-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --lgb-bg-rgb: 255, 255, 255; --lgb-bubble-rgb: 255, 255, 255;
  --lgb-tint-a: rgba(var(--lgb-bg-rgb), calc(var(--lgb-bg-opacity, .26) * 1));
  --lgb-tint-b: rgba(var(--lgb-bg-rgb), calc(var(--lgb-bg-opacity, .26) * .27));
  --lgb-edge: rgba(255, 255, 255, .34);
  --lgb-spec: rgba(255, 255, 255, .6);
  --lgb-shadow: rgba(0, 0, 0, .34);
  --lgb-lens-a: rgba(var(--lgb-bubble-rgb), calc(var(--lgb-bubble-opacity, .34) * 1));
  --lgb-lens-b: rgba(var(--lgb-bubble-rgb), calc(var(--lgb-bubble-opacity, .34) * .3));
  /* الموضع (fixed) والإظهار (display:flex على الهاتف فقط) تحددهما كل صفحة */
  align-items: stretch; gap: 2px;
  padding: 5px; border-radius: var(--lgb-radius, 32px); isolation: isolate; overflow: hidden;
  background: linear-gradient(135deg, var(--lgb-tint-a), var(--lgb-tint-b) 55%, var(--lgb-tint-a));
  -webkit-backdrop-filter: blur(var(--lgb-blur, 22px)) saturate(190%) brightness(1.08);
  backdrop-filter: blur(var(--lgb-blur, 22px)) saturate(190%) brightness(1.08);
  border: 1px solid var(--lgb-edge);
  box-shadow:
    inset 0 1.5px 1px var(--lgb-spec),
    inset 0 -1px 1px rgba(255, 255, 255, .14),
    inset 0 0 26px rgba(255, 255, 255, .07),
    0 calc(var(--lgb-elev, 12) * 1px) calc(var(--lgb-elev, 12) * 2.8px) var(--lgb-shadow), 0 2px 8px rgba(0, 0, 0, .18);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
/* لمعة الضوء (specular) في أعلى الزجاج */
.lgb::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(120% 90% at 12% -20%, rgba(255, 255, 255, .42), transparent 55%),
    radial-gradient(90% 70% at 100% 120%, rgba(255, 255, 255, .16), transparent 60%);
  mix-blend-mode: soft-light;
}
.lgb > :not(.lgb-lens) { position: relative; z-index: 2; }

/* العدسة المنزلقة خلف العنصر النشط */
.lgb-lens {
  position: absolute; left: 0; top: 5px; height: var(--lgb-bubble-h, 47px); width: 0; z-index: 1; pointer-events: none; border-radius: calc(var(--lgb-radius, 32px) - 5px);
  background: linear-gradient(180deg, var(--lgb-lens-a), var(--lgb-lens-b));
  border: var(--lgb-bubble-bw, 1px) solid var(--lgb-bubble-border, var(--lgb-edge));
  box-shadow:
    inset 0 1.5px 1px var(--lgb-spec), inset 0 -10px 16px rgba(255, 255, 255, .06),
    0 8px 18px color-mix(in srgb, var(--lgb-active) 32%, transparent);
  -webkit-backdrop-filter: blur(6px) saturate(200%) brightness(1.18);
  backdrop-filter: blur(6px) saturate(200%) brightness(1.18);
  transition: transform var(--lgb-dur) var(--lgb-ease), width var(--lgb-dur) var(--lgb-ease), top var(--lgb-dur) var(--lgb-ease),
              height var(--lgb-dur) var(--lgb-ease), opacity .2s, scale .3s var(--lgb-bounce);
  will-change: transform;
}
.lgb.lgb-drag .lgb-lens { transition: width var(--lgb-dur) var(--lgb-ease), scale .3s var(--lgb-bounce), opacity .2s; scale: 1.1 1.14; }

/* العناصر: لون مُنتقل + أيقونة تكبر وترتد عند الاختيار */
.lgb > a, .lgb > button {
  color: var(--lgb-inactive); background: none !important; box-shadow: none !important; border-color: transparent !important;
  text-decoration: none; transition: color var(--lgb-dur) var(--lgb-ease);
}
.lgb > a.on, .lgb > button.on, .lgb > .lgb-hot { color: var(--lgb-active); }
.lgb > a svg, .lgb > button svg { transition: transform .35s var(--lgb-bounce); transform: scale(1); }
.lgb > a.on svg, .lgb > button.on svg { transform: scale(1.2); animation: lgb-pop .45s var(--lgb-ease); }
.lgb > a:active svg, .lgb > button:active svg { transform: scale(.92); animation: none; }
@keyframes lgb-pop { 0% { transform: scale(1); } 40% { transform: scale(1.38); } 70% { transform: scale(1.12); } 100% { transform: scale(1.2); } }


/* متصفحات بلا backdrop-filter: خلفية شبه معتمة بدل الزجاج */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .lgb { background: var(--fz-glass-solid, rgba(16, 20, 60, .94)); }
}
@media (prefers-reduced-motion: reduce){
  .lgb-lens, .lgb > a svg, .lgb > button svg, .lgb > a, .lgb > button { transition-duration: .01ms !important; animation: none !important; }
}

/* خيارات إضافية بأسماء LiquidGlassNavBar: حجم الأيقونة والخط وإخفاء الفقاعة */
.lgb > a svg, .lgb > button svg { width: var(--lgb-icon, 24px); height: var(--lgb-icon, 24px); flex: none; }
.lgb > a i, .lgb > button i { display: grid; place-items: center; inline-size: auto; block-size: auto; font-style: normal; }
.lgb > a, .lgb > button { font-size: var(--lgb-font, inherit); }
.lgb.lgb-nobubble .lgb-lens { display: none; }
.lgb.lgb-nobubble > a.on, .lgb.lgb-nobubble > button.on { background: none; }
.lgb.lgb-hover .lgb-lens { scale: 1.03; }

.lgb > a, .lgb > button { -webkit-user-drag: none; user-select: none; }

/* ============================================================================
   شريط واحد موحّد لكل المنصة (التطبيق، الدردشة): نفس الحجم والموضع والألوان.
   مواصفاته على غرار LiquidGlassBarStyle: height 57 · borderRadius 32 · iconSize 24 · selectedIconScale 1.2
   الألوان من ثيم FOWZ · animation 250ms easeOutQuad · صغير ويتوسّط أسفل الشاشة.
   الصفحات تتحكّم فقط في الإظهار (display) على الهاتف؛ الشكل والمقاس هنا.
   ========================================================================== */
.lgb {
  position: fixed; inset-inline: 0; margin-inline: auto; z-index: 9970;
  inline-size: fit-content; min-inline-size: 200px; max-inline-size: min(400px, calc(100vw - 24px));
  block-size: var(--lgb-h, 57px); box-sizing: border-box;
  inset-block-end: calc(var(--lgb-bottom, 12px) + env(safe-area-inset-bottom, 0px));
  --lgb-bubble-h: calc(var(--lgb-h, 57px) - 12px);
}
.lgb > a, .lgb > button {
  flex: 1 1 0; min-inline-size: 54px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 0 4px; margin: 0; border: 0; cursor: pointer; font: inherit; font-size: var(--lgb-font, 10px); font-weight: 700; line-height: 1.1; white-space: nowrap;
  border-radius: calc(var(--lgb-radius, 32px) - 5px); min-block-size: 44px; touch-action: manipulation; inline-size: auto; block-size: auto; position: relative;
}
.lgb > a span:not(.badge):not(.tip), .lgb > button span:not(.badge):not(.tip) { font-size: var(--lgb-font, 10px); max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; }
.lgb .tip { display: none !important; }
.lgb .badge { position: absolute; inset-block-start: 4px; inset-inline-end: 14px; z-index: 3; }
@media (max-width: 380px){ .lgb { --lgb-font: 9.5px; } .lgb > a, .lgb > button { min-inline-size: 48px; padding: 0 2px; } }
@media (min-width: 901px){ .lgb { inset-block-end: 20px; } }
/* الألوان من ثيم FOWZ (fowz-theme.css) */

