/* بحث أدوات المفيد — autocomplete dropdown. Small enough to ride along on every page; the panel is
   appended inside the search form, so it inherits the form's own position and RTL flow. */
.ams-input, .amsg-host { position: relative; }
.amsg-host { z-index: auto; }

.amsg-list {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  inset-block-start: 100%;
  z-index: 99999;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E5DBD7;
  border-radius: 10px;
  font-family: Tahoma, 'Segoe UI', Arial, sans-serif;
  text-align: start;
}
.amsg-list[hidden] { display: none; }

.amsg-item { display: block; margin: 0; }
.amsg-item > a, .amsg-item > button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 8px 9px; text-align: start; text-decoration: none;
  font: 400 12px/1.5 Tahoma, Arial, sans-serif; color: #241E1D;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.amsg-item > a:hover, .amsg-item > button:hover, .amsg-item.is-active > a, .amsg-item.is-active > button {
  background: #F5ECEA; color: #7B211B;
}
.amsg-item > a:focus-visible, .amsg-item > button:focus-visible { outline: 3px solid #B8322B; outline-offset: -2px; }

.amsg-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; overflow: hidden;
  background: #F5ECEA; border-radius: 7px; font-size: 14px; }
.amsg-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amsg-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.amsg-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 700; }
.amsg-cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #6F6260; }
.amsg-kind { flex: none; margin-inline-start: auto; font-size: 10.5px; color: #6F6260; background: #F5ECEA; border-radius: 999px; padding: 2px 7px; }

.amsg-sep { padding: 6px 9px 2px; font-size: 10.5px; color: #6F6260; border-block-start: 1px solid #E5DBD7; margin-block-start: 3px; }
.amsg-sep:first-child { border-block-start: 0; margin-block-start: 0; }
.amsg-none { padding: 9px; font-size: 12px; color: #6F6260; }
.amsg-load { padding: 9px; font-size: 12px; color: #6F6260; animation: amsg-wait 1.1s ease-in-out infinite; }
@keyframes amsg-wait { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .amsg-load { animation: none; } }
.amsg-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 480px) {
  .amsg-list { max-height: 240px; }
  .amsg-item > a, .amsg-item > button { padding: 10px 9px; }
  .amsg-kind { display: none; }
}
