/* Side drawer search overlay */
/* إزالة جميع الظلال وتأثيرات الـ hover */
.ymd-search-overlay * {
    box-shadow: none !important;
    text-shadow: none !important;
}
.ymd-search-overlay *:hover {
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
}

.ymd-search-overlay { 
  position: fixed; 
  inset: 0; 
  z-index: 1000; 
  display: none;
  /* Force GPU acceleration for instant display on iOS */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: opacity, visibility;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ymd-search-overlay.is-open { 
  display: block;
  /* Ensure instant visibility */
  opacity: 1;
  visibility: visible;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.ymd-search-overlay__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); transition: none; }

.ymd-search-drawer { position: absolute; top: 0; bottom: 0; right: 0; width: 420px; max-width: 100%; background: #ffffff; display: flex; flex-direction: column; transition: none; }
html[dir="rtl"] .ymd-search-drawer { right: 0; left: auto; }

.ymd-search-drawer__header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid #e5e7eb; }
.ymd-search-drawer__label { position: absolute; left: -9999px; }
.ymd-search-drawer__input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 1rem; box-shadow: none; transition: none; }
.ymd-search-drawer__input:focus { outline: none; border-color: #111827; box-shadow: none; }
.ymd-search-drawer__input:hover { box-shadow: none; }
.ymd-search-drawer__close { background: transparent; border: 0; color: #111827; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.ymd-search-drawer__close,
.ymd-search-drawer__close:hover,
.ymd-search-drawer__close:focus,
.ymd-search-drawer__close:active { background: transparent !important; box-shadow: none !important; outline: none !important; border: none !important; color: #111827 !important; }

.ymd-search-drawer__body { flex: 1; overflow-y: auto; padding: 12px; }
.ymd-search-drawer__loading { color: #6b7280; padding: 8px 0; }
.ymd-search-drawer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ymd-search-drawer__item { 
    display: grid; 
    grid-template-columns: 56px 1fr auto; 
    gap: 12px; 
    align-items: center; 
    padding: 12px; 
    border: 1px solid #e5e7eb; 
    border-radius: 10px; 
    background: #fafafa; 
    transition: none;
    box-shadow: none;
}
.ymd-search-drawer__item:hover {
    border-color: #e5e7eb;
    box-shadow: none;
    background: #fafafa;
}
.ymd-search-drawer__thumb { 
    width: 56px; 
    height: 56px; 
    border-radius: 8px; 
    overflow: hidden; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}
.ymd-search-drawer__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ymd-search-drawer__content {
    flex: 1;
    min-width: 0;
}
.ymd-search-drawer__title { 
    font-weight: 700; 
    color: #111827; 
    margin: 0; 
    font-size: 0.9375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}
.ymd-search-drawer__link { 
    color: #069669; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 0.875rem;
    padding: 8px 16px;
    border: 2px solid #069669;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
.ymd-search-drawer__link:hover {
    background-color: transparent;
    color: #069669;
    transform: none;
    box-shadow: none;
}

@media (max-width: 640px) {
  .ymd-search-drawer { width: 100%; }
  
  .ymd-search-drawer__item {
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    padding: 10px;
  }
  
  .ymd-search-drawer__thumb {
    width: 48px;
    height: 48px;
  }
  
  .ymd-search-drawer__title {
    font-size: 0.875rem;
  }
  
  .ymd-search-drawer__link {
    font-size: 0.8125rem;
    padding: 6px 12px;
  }
}
