/*
 * navbar-mobile.css — تنسيق الناف بار على الموبايل
 * مُحمَّل تلقائياً عبر includes/navbar.php على كامل الصفحات
 */

/* ═══════════════════════════════════════════════════
   1. إخفاء الأيقونات من الناف بار العلوي على الموبايل
   ═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-actions .nav-icon-wrap,
  .nav-actions .nav-icon-btn,
  .nav-actions .nib-bell,
  .nav-actions .nib-msg,
  .nav-actions .nav-cart-btn,
  .nav-actions .nav-va-btn,
  .nav-actions .nav-avatar-wrap,
  .nav-actions .nav-avatar-btn,
  .nav-actions .nav-signin,
  .nav-actions .lang-btn { display: none !important; }

  .nav-ham { display: flex !important; }
  body, html { overflow-x: hidden; }

  .navbar.scrolled {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(10, 10, 16, .97) !important;
  }
}

/* ═══════════════════════════════════════════════════
   2. عنوان القسم (Section Label)
   ═══════════════════════════════════════════════════ */
.mob-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(42, 125, 216, .6);
  padding: 14px 14px 6px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════
   3. شبكة الإجراءات السريعة (Quick Actions Grid 2×2)
   ═══════════════════════════════════════════════════ */
.mob-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 10px 10px;
}

.mob-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  text-decoration: none;
  color: rgba(255, 255, 255, .75);
  transition: background .2s, border-color .2s, transform .15s;
  min-height: 72px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.mob-quick-btn:active {
  transform: scale(.96);
  background: rgba(42, 125, 216, .14);
  border-color: rgba(42, 125, 216, .35);
}

/* الدائرة حول الأيقونة */
.mob-quick-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(42, 125, 216, .1);
  border: 1px solid rgba(42, 125, 216, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, .85);
  flex-shrink: 0;
}
.mob-quick-icon svg { width: 17px; height: 17px; }

/* نص تحت الأيقونة */
.mob-quick-label {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .65);
  text-align: center;
  line-height: 1.2;
}

/* Badge عداد الإشعارات */
.mob-q-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  border: 1.5px solid rgba(9, 9, 17, .9);
}

/* ═══════════════════════════════════════════════════
   4. قائمة روابط الحساب
   ═══════════════════════════════════════════════════ */
.mob-account-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 10px 6px;
}

.mob-account-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  text-decoration: none;
  color: rgba(255, 255, 255, .75);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.mob-account-link:active {
  background: rgba(42, 125, 216, .1);
}

/* أيقونة مربعة ملوّنة */
.mob-acl-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* سهم اليمين */
.mob-acl-arrow {
  margin-inline-start: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, .25);
}

/* ═══════════════════════════════════════════════════
   5. زر تسجيل الخروج
   ═══════════════════════════════════════════════════ */
.mob-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 10px 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .2);
  color: #f87171;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.mob-logout-btn:active {
  background: rgba(239, 68, 68, .18);
}

/* ═══════════════════════════════════════════════════
   6. زر تسجيل الدخول (للزوار)
   ═══════════════════════════════════════════════════ */
.mob-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 8px 10px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(42,125,216,.18), rgba(42,125,216,.08));
  border: 1px solid rgba(42, 125, 216, .35);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .3px;
  transition: background .2s, transform .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}
.mob-signin-btn:active {
  background: rgba(42, 125, 216, .28);
  transform: scale(.98);
}
.mob-signin-btn i { font-size: 16px; color: #60a5fa; }

/* ═══════════════════════════════════════════════════
   7. مبدّل اللغة في أسفل القائمة
   ═══════════════════════════════════════════════════ */
.mob-lang-wrap {
  padding: 6px 10px 10px;
  border-top: 1px solid rgba(42, 125, 216, .1);
  margin-top: 4px;
}

.mob-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(42, 125, 216, .08);
  border: 1px solid rgba(42, 125, 216, .2);
  color: rgba(42, 125, 216, .85);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
  touch-action: manipulation;
}
.mob-lang-btn:active {
  background: rgba(42, 125, 216, .18);
}

/* ═══════════════════════════════════════════════════
   8. Mobile nav base styles (shared across all pages)
   ═══════════════════════════════════════════════════ */

/* Hamburger panel — drops down from navbar */
.mobile-nav{
  display:none;
  position:fixed;
  top:60px;left:0;right:0;
  z-index:999;
  background:rgba(9,9,17,.98);
  border-bottom:1px solid rgba(42,125,216,.12);
  padding:8px;
  flex-direction:column;
  gap:2px;
  backdrop-filter:blur(20px);
  max-height:calc(100vh - 60px);
  overflow-y:auto
}
.mobile-nav.open{display:flex;animation:slideDown .22s ease}
@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}

/* Nav links + toggle buttons */
.mobile-nav a,.mob-services-toggle{
  font-size:14px;font-weight:600;
  padding:11px 13px;border-radius:11px;
  color:rgba(255,255,255,.65);
  transition:all .22s;
  display:flex;align-items:center;justify-content:space-between;
  border:none;background:none;cursor:pointer;
  width:100%;text-align:right;
  text-decoration:none;
  min-height:44px;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.mobile-nav a:hover,.mob-services-toggle:hover{background:rgba(42,125,216,.1);color:#fff}

/* Collapsible sub-menus (Services / Store / Company) */
.mob-services-sub{display:none;flex-direction:column;gap:1px;padding-right:10px}
.mob-services-sub.open{display:flex}
.mob-services-sub a{font-size:13px;padding:9px 13px;border-radius:9px;color:rgba(206,206,206,.55)}
.mob-services-sub a:hover,.mob-services-sub a:active{color:#fff;background:rgba(42,125,216,.07)}

/* ═══════════════════════════════════════════════════
   touch-action عام على كل عناصر التنقل
   ═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .mobile-nav a,
  .mob-services-toggle,
  .nav-ham {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav a,
  .mob-services-toggle {
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════════════
   9. Nav new elements — desktop
   ═══════════════════════════════════════════════════ */

/* "New" badge on Store nav item */
.nav-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: #1E90FF;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 14px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Icon groups (bell+mail / cart+sparkle) */
.nav-icon-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Vertical divider between icon groups */
.nav-v-divider {
  width: 1px;
  height: 20px;
  background: #2a2a2a;
  flex-shrink: 0;
}

/* AR | EN language toggle */
.nav-lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  color: rgba(206, 206, 206, .4);
  text-decoration: none;
  padding: 5px 7px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-lang-toggle:hover { color: rgba(206, 206, 206, .75); background: rgba(255,255,255,.05); }
.nav-lang-active { color: #fff; }
.nav-lang-sep { color: rgba(206, 206, 206, .2); font-weight: 400; }

/* CTA button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 17px;
  border-radius: 8px;
  background: #1E90FF;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(30, 144, 255, .35);
  flex-shrink: 0;
}
.nav-cta:hover {
  background: #1a7de0;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(30, 144, 255, .45);
}
.nav-cta:active { transform: translateY(0); }

/* Hide CTA + lang toggle on mobile — they appear inside burger menu */
@media (max-width: 960px) {
  .nav-cta,
  .nav-lang-toggle,
  .nav-v-divider,
  .nav-icon-group { display: none !important; }
}

/* ═══════════════════════════════════════════════════
   10. Store dropdown — nested flyout (desktop)
   ═══════════════════════════════════════════════════ */

/* Row that has a flyout sub-menu */
.nav-dd-has-sub {
  position: relative;
}

/* ── Bridge: transparent zone that prevents hover loss when crossing the gap ── */
.nav-dd-has-sub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 100%;
  width: 14px;   /* covers gap + buffer */
  height: 100%;
  background: transparent;
}

/* Count badge (e.g. "1" inside Plugins & Tools) */
.nav-dd-count {
  margin-left: auto;
  min-width: 19px;
  text-align: center;
  background: rgba(30, 144, 255, .18);
  color: #1E90FF;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* Small right-arrow chevron */
.nav-dd-arrow {
  font-size: 8px;
  opacity: .35;
  margin-left: 3px;
  flex-shrink: 0;
  transition: opacity .18s, transform .18s;
}
.nav-dd-has-sub:hover .nav-dd-arrow {
  opacity: .8;
  transform: translateX(2px);
}

/* Active highlight on "Plugins & Tools" row */
.nav-dd-has-sub > a {
  background: rgba(30, 144, 255, .07);
  border: 1px solid rgba(30, 144, 255, .14);
  border-radius: 8px;
  color: rgba(206, 206, 206, .9) !important;
}
.nav-dd-has-sub:hover > a {
  background: rgba(30, 144, 255, .13);
  border-color: rgba(30, 144, 255, .28);
  color: #fff !important;
}

/* ── The flyout sub-menu ── */
.nav-dd-sub {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: calc(100% + 8px);
  top: -6px;           /* slight vertical alignment */
  min-width: 200px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 6px;
  list-style: none;
  box-shadow: 0 20px 50px rgba(0,0,0,.8), 0 0 0 0.5px rgba(255,255,255,.04);
  z-index: 9100;
  transition: opacity .18s ease, visibility .18s, transform .18s cubic-bezier(.16,1,.3,1);
  transform: translateX(-6px);
}
.nav-dd-has-sub:hover .nav-dd-sub {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* RTL: flyout goes to the left */
[dir="rtl"] .nav-dd-sub,
html[lang="ar"] .nav-dd-sub {
  left: auto;
  right: calc(100% + 8px);
  transform: translateX(6px);
}
[dir="rtl"] .nav-dd-has-sub:hover .nav-dd-sub,
html[lang="ar"] .nav-dd-has-sub:hover .nav-dd-sub {
  transform: translateX(0);
}
[dir="rtl"] .nav-dd-has-sub::before,
html[lang="ar"] .nav-dd-has-sub::before {
  left: auto;
  right: 100%;
}

/* Sub-menu links */
.nav-dd-sub li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(206, 206, 206, .8);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .18s, color .18s;
  text-decoration: none;
}
.nav-dd-sub li a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.nav-dd-sub li a i {
  color: #1F7A8C;
  font-size: 12px;
  width: 15px;
  text-align: center;
  flex-shrink: 0;
}

/* "Soon" rows — dimmed, not clickable */
.nav-dd-soon > span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  color: rgba(206, 206, 206, .28);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: not-allowed;
  user-select: none;
}
.nav-dd-soon > span i {
  font-size: 12px;
  width: 15px;
  text-align: center;
  flex-shrink: 0;
  opacity: .4;
}

/* "SOON" gold badge */
.nav-soon-badge {
  margin-left: auto;
  background: rgba(202, 138, 4, .1);
  color: #b45309;
  border: 1px solid rgba(202, 138, 4, .2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 14px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   11. Mobile-nav new elements
   ═══════════════════════════════════════════════════ */

/* "New" badge inside mobile toggle button */
.mob-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: #1E90FF;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  line-height: 14px;
  vertical-align: middle;
  margin: 0 4px;
  flex-shrink: 0;
}

/* "More coming soon" inside mobile sub-menu */
.mob-coming-soon {
  display: block;
  padding: 8px 14px 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .3);
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, .06);
  margin-top: 2px;
}

/* Mobile CTA button (guest view) */
.mob-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 10px 4px;
  padding: 14px;
  border-radius: 14px;
  background: #1E90FF;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .3px;
  transition: background .2s, transform .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
  box-shadow: 0 4px 18px rgba(30, 144, 255, .35);
}
.mob-cta-btn:active {
  background: #1a7de0;
  transform: scale(.98);
}

/* ═══════════════════════════════════════════════════
   12. Mobile Store — grouped categories
   ═══════════════════════════════════════════════════ */

/* Group wrapper (Plugins & Tools + its items) */
.mob-store-group {
  border: 1px solid rgba(30, 144, 255, .15);
  border-radius: 10px;
  background: rgba(30, 144, 255, .05);
  margin: 4px 0 6px;
  overflow: hidden;
}

/* Group header row */
.mob-store-group-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(206, 206, 206, .55);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(30, 144, 255, .1);
}
.mob-store-group-hd i {
  font-size: 11px;
  color: #1E90FF;
  width: 14px;
  text-align: center;
}

/* Count badge inside group header */
.mob-store-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 20px;
  background: rgba(30, 144, 255, .2);
  color: #1E90FF;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
}

/* Individual product link inside group */
.mob-store-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(206, 206, 206, .85);
  text-decoration: none;
  transition: background .18s, color .18s;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mob-store-item:active { background: rgba(30, 144, 255, .1); color: #fff; }
.mob-store-item i {
  font-size: 12px;
  color: #1F7A8C;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

/* "Soon" rows */
.mob-store-soon {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(206, 206, 206, .3);
  cursor: not-allowed;
  user-select: none;
}
.mob-store-soon i {
  font-size: 12px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  opacity: .5;
}

/* ═══════════════════════════════════════════════════
   Desktop dropdown — left-align + compact + groups
   ═══════════════════════════════════════════════════ */
@media (min-width: 961px) {
  .nav-dropdown {
    left: 0;
    transform: translateY(-6px);
    min-width: 175px;
    padding: 5px;
  }
  .nav-has-drop:hover .nav-dropdown,
  .nav-dropdown:hover {
    transform: translateY(0);
  }
  .nav-dropdown li a {
    padding: 7px 10px;
    font-size: 12px;
    gap: 7px;
  }
  .nav-dropdown li a i {
    font-size: 11px;
    width: 12px;
  }

  /* group label */
  .nav-dd-label {
    padding: 4px 10px 2px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: rgba(42, 125, 216, .55);
    list-style: none;
  }

  /* separator line */
  .nav-dd-sep {
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 4px 6px;
    list-style: none;
  }
}

/* "SOON" gold badge (mobile) */
.mob-soon-badge {
  margin-left: auto;
  background: rgba(202, 138, 4, .12);
  color: #ca8a04;
  border: 1px solid rgba(202, 138, 4, .22);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 14px;
  flex-shrink: 0;
}
