/* =================================================================
   Inventory Search Dropdown — typeahead results
   Namespace: isd- (inventory search dropdown)
   Mobile-first, responsive
   ================================================================= */

.isd-dropdown {
  /* position/top/left/width set by JS — fixed to escape overflow:hidden */
  z-index: 30;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

.isd-dropdown[hidden] {
  display: none;
}

/* --- Results list --- */
.isd-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Single result row --- */
.isd-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.15s;
}

.isd-result:last-child {
  border-bottom: none;
}

.isd-result:hover,
.isd-result.isd-active {
  background-color: #f8fafc;
}

/* --- Thumbnail --- */
.isd-thumb {
  width: 72px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background-color: #f1f5f9;
}

.isd-no-img {
  width: 72px;
  height: 48px;
  border-radius: 4px;
  flex-shrink: 0;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 10px;
}

/* --- Text block --- */
.isd-info {
  flex: 1;
  min-width: 0;
}

.isd-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
  margin: 0;
}

.isd-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

/* --- Condition badge --- */
.isd-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
}

.isd-badge-new {
  background-color: #dcfce7;
  color: #166534;
}

.isd-badge-used {
  background-color: #f1f5f9;
  color: #475569;
}

/* --- Price --- */
.isd-price {
  flex-shrink: 0;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.isd-price-strike {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  text-decoration: line-through;
}

/* --- Footer: "View all" --- */
.isd-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  color: var(--accent, #006883);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.isd-footer:hover {
  background-color: #f0f7ff;
}

.isd-footer-arrow {
  margin-left: 4px;
  font-size: 14px;
}

/* --- Loading state --- */
.isd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #94a3b8;
  font-size: 13px;
  gap: 8px;
}

.isd-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--accent, #006883);
  border-radius: 50%;
  animation: isd-spin 0.6s linear infinite;
}

@keyframes isd-spin {
  to { transform: rotate(360deg); }
}

/* --- Empty state --- */
.isd-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* =================================================================
   TABLET (769px+)
   ================================================================= */
@media (min-width: 769px) {
  .isd-thumb {
    width: 80px;
    height: 54px;
  }

  .isd-result {
    padding: 12px 16px;
  }
}

/* Desktop header widening handled by JS (positionDropdown) */
