/* cats_subcategories.css
   نخلي Categories Overlay بنفس الشكل القديم (cats-item)
   + Subcategories collapsible تحت Parent.

   - Parent arrow: <  ; when open: ˅
   - Subcategory: بلا سهم
*/

/* إزالة marker الافتراضي ديال details/summary */
.cats-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.cats-group>summary {
  list-style: none;
}

.cats-group>summary::-webkit-details-marker {
  display: none;
}

.cats-group>summary::marker {
  content: '';
}

/* تأكيد أن العناصر كتشُدّ العرض كامل */
.cats-list .cats-item,
.cats-list .cats-parent,
.cats-list .cats-subitem {
  width: 100%;
  box-sizing: border-box;
}

/* Parent: summary ولى أصلاً cats-item فـ HTML، غير كنزيدو سلوك الزر */
.cats-parent {
  cursor: pointer;
  user-select: none;
}

.cats-parent:focus,
.cats-parent:focus-visible {
  outline: none;
  box-shadow: none;
}

/* السهم ديال Parent فقط */
.cats-parent .cats-arrow {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-smooth);
}

.cats-parent .cats-arrow::before {
  font-family: "bootstrap-icons";
  content: "\F285";
  /* bi-chevron-right */
  font-weight: 800;
}

html[dir="rtl"] .cats-parent .cats-arrow::before {
  content: "\F284";
  /* bi-chevron-left */
}

.cats-group[open]>.cats-parent .cats-arrow {
  transform: rotate(90deg);
}

html[dir="rtl"] .cats-group[open]>.cats-parent .cats-arrow {
  transform: rotate(-90deg);
}


/* Subcategories container */
.cats-sublist {
  padding: 0;
  margin: 0;
}

/* Subcategory items: نفس cats-item مع indentation خفيفة */
.cats-subitem {
  padding-inline-start: 44px;
  /* indent بسيط (RTL/LTR) */
}

/* ما نحتاجوش dot */
.cats-subitem .cats-subdot {
  display: none !important;
}

/* تمييز active بحال القديم */
.cats-subitem.active {
  background: #e9f7f0;
}

/* (اختياري) خلفية خفيفة للـ parent ملي كيكون محلول */
.cats-group[open]>.cats-parent {
  background: #fafafa;
}

/* Subcategory icon/emoji (أصغر من parent) */
.cats-subitem .cats-subicon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 28px;
  border-radius: 8px;
  background: #fff;
}

.cats-subitem .cats-subemoji {
  width: 28px;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}