/* 模型选择面板样式 - 模仿知识库面板样式 */
.model-selector-panel {
  position: absolute;
  top: 60px; /* 从聊天头部下方开始 */
  left: 0px;
  right: 0px;
  bottom: 0px;
  background: linear-gradient(135deg, #2D2D2D 0%, #252525 100%);
  border: 1px solid #404040;
  border-radius: 8px;
  z-index: 100; /* 确保在其他内容之上 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}


/* 筛选区域样式 */
.model-filter-section {
  padding: 20px;
  background: linear-gradient(135deg, #3C3C3C 0%, #333333 100%);
  border-bottom: 1px solid #404040;
}

/* 搜索容器 */
.search-container {
  position: relative;
  margin-bottom: 15px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 10px 40px;
  background: #2D2D2D;
  border: 1px solid #555555;
  border-radius: 6px;
  color: #E0E0E0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #00AD62;
  box-shadow: 0 0 0 2px rgba(0, 173, 98, 0.2);
}

.search-input::placeholder {
  color: #888;
}

/* 提供商筛选 */
.provider-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  color: #B0B0B0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-tag {
  padding: 6px 12px;
  background: #3C3C3C;
  color: #B0B0B0;
  border: 1px solid #555555;
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.provider-tag:hover {
  background: #4A4A4A;
  border-color: #666;
}

.provider-tag.active {
  background: linear-gradient(135deg, #00AD62 0%, #008C4F 100%);
  border-color: #00AD62;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 173, 98, 0.3);
}

/* 模型列表容器 */
.model-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.model-list-container::-webkit-scrollbar {
  width: 6px;
}

.model-list-container::-webkit-scrollbar-track {
  background: #2D2D2D;
  border-radius: 3px;
}

.model-list-container::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 3px;
}

.model-list-container::-webkit-scrollbar-thumb:hover {
  background: #00AD62;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #808080;
  font-style: italic;
  background: linear-gradient(135deg, #3C3C3C 0%, #333333 100%);
  border-radius: 12px;
  border: 2px dashed #555555;
  margin: 20px;
}

.empty-state::before {
  content: "🤖";
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
  opacity: 0.6;
}

/* 模型网格布局 */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  padding: 0px;
}

/* 模型卡片样式 */
.model-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #3C3C3C 0%, #333333 100%);
  border: 1px solid #444444;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.model-card:hover {
  border-color: #00AD62;
  box-shadow: 0 4px 12px rgba(0, 173, 98, 0.2);
  transform: translateY(-2px);
  background: linear-gradient(135deg, #444444 0%, #3A3A3A 100%);
}

.model-card.selected {
  border-color: #00AD62;
  background: linear-gradient(135deg, #00AD62 0%, #008C4F 100%);
  box-shadow: 0 4px 12px rgba(0, 173, 98, 0.3);
}

.model-info {
  flex: 1;
  min-width: 0;
}

.model-name {
  font-weight: 600;
  color: #efebeb;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.model-provider {
  font-size: 13px;
  color: #B0B0B0;
  background: #2D2D2D;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #444444;
  display: inline-block;
}

.model-card.selected .model-name {
  color: white;
}

.model-card.selected .model-provider {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.selected-indicator {
  color: white;
  font-size: 16px;
  font-weight: bold;
  margin-left: 10px;
}

/* 搜索结果信息 */
.search-results-info {
  padding: 10px 20px;
  font-size: 12px;
  color: #888;
  text-align: center;
  border-top: 1px solid #404040;
  background: #2D2D2D;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .model-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  
  .model-filter-section {
    padding: 15px;
  }
  
  .provider-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .provider-tags {
    width: 100%;
    justify-content: flex-start;
  }
}