/* ==========================================================================
   dropdown.css — قائمة اختيار الكتاب في قسم الاقتباسات (#book-dd).
   تحسين تدريجي: بدون JS يظهر <select> العادي؛ مع JS يُخفى ويحل محله هذا المكوّن
   (زر + قائمة بحدود ذهبية وعدّاد الاقتباسات) بألوان الموقع: #173829 / #C8A143 / #F8F5EE.
   ========================================================================== */
.abugroon-dd { position: relative; width: 100%; }

/* بدون JS: select عادي */
.abugroon-dd__btn,
.abugroon-dd__panel { display: none; }

/* مع JS */
.abugroon-dd.is-enhanced select { display: none; }
.abugroon-dd.is-enhanced .abugroon-dd__btn { display: flex; }

.abugroon-dd__btn {
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  background: #fff;
  border: 1px solid #D5C7AF;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #173829;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.abugroon-dd__btn:hover,
.abugroon-dd__btn:focus-visible,
.abugroon-dd.is-open .abugroon-dd__btn {
  outline: none;
  border-color: #C8A143;
  box-shadow: 0 0 0 3px rgba(200, 161, 67, 0.2);
}
.abugroon-dd__label { flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abugroon-dd__chev { width: 1.1rem; height: 1.1rem; flex: none; color: #C8A143; transition: transform 0.2s; }
.abugroon-dd.is-open .abugroon-dd__chev { transform: rotate(180deg); }

.abugroon-dd__panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 0.5rem);
  z-index: 45;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.375rem;
  background: #FBF9F4;
  border: 2px solid #C8A143;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
}
.abugroon-dd.is-open .abugroon-dd__panel { display: block; }
.abugroon-dd__panel::-webkit-scrollbar { width: 7px; }
.abugroon-dd__panel::-webkit-scrollbar-track { background: #ECE5D8; border-radius: 10px; }
.abugroon-dd__panel::-webkit-scrollbar-thumb { background: #C8A143; border-radius: 10px; }

.abugroon-dd__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: right;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.625rem;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: #173829;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.abugroon-dd__opt:hover,
.abugroon-dd__opt:focus-visible { outline: none; background: #F0E8D4; }
.abugroon-dd__opt[aria-selected="true"] { background: #173829; color: #E0C172; }
.abugroon-dd__opt[aria-selected="true"]::before { content: "❖"; color: #C8A143; margin-inline-end: 0.5rem; }
.abugroon-dd__opt > span:first-child { flex: 1; }
.abugroon-dd__count {
  flex: none;
  font-size: 0.6875rem;
  background: #EFE8D8;
  color: #8E6D24;
  border-radius: 9999px;
  padding: 0.0625rem 0.5rem;
}
.abugroon-dd__opt[aria-selected="true"] .abugroon-dd__count { background: rgba(200, 161, 67, 0.25); color: #F4E2B2; }
