/* Category Path Typeahead – Modern UI */

.suggest-dropdown {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  z-index: 30;
  display: none;
}

.suggest-dropdown.open { display: block !important; }

.sug-section {
  padding: 6px 10px;
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sug-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
  border-top: 1px solid #f2f3f5;
  transition: background 120ms ease, transform 80ms ease;
}

.sug-item:first-child { border-top: 0; }
.sug-item:hover { background: #f8fafc; }
.sug-item.active { background: #eef2ff; }

.sug-item .sug-icon {
  flex: 0 0 18px;
  color: #64748b;
  margin-top: 2px;
}

.sug-item .sug-content {
  min-width: 0;
  flex: 1 1 auto;
}

.sug-item .sug-label {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sug-item .sug-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-dropdown mark {
  background: #fef3c7;    /* amber-100 */
  color: #92400e;         /* amber-800 */
  padding: 0 2px;
  border-radius: 3px;
}

.sug-empty,
.sug-loading {
  padding: 14px 12px;
  color: #6b7280;
  font-size: 13px;
}

.sug-loading .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #c7ccd1;
  border-top-color: #6366f1;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

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

/* Input focus style (opsional) */
.catpath-typeahead input[type="text"] {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
.catpath-typeahead input[type="text"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}