/* Embedded Components Styles */
.global-search-embedded {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.search-top {
  flex-shrink: 0;
}

.search-middle {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.search-bottom {
  flex-shrink: 0;
  padding: 16px 0;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

.global-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.global-search-card {
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-header span {
  flex: 1;
}

.search-close-btn {
  margin-left: auto;
}

.search-input-section {
  margin-bottom: 16px;
}

.search-results-section {
  max-height: 50vh;
  display: flex;
  flex-direction: column;
}

.search-results-section .search-results-list-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.search-results-section .search-pagination {
  flex-shrink: 0;
  margin-top: 16px;
  text-align: center;
}

.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
  height: 100%;
}

.search-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
  height: 100%;
}

.search-placeholder-icon {
  font-size: 48px;
  color: #d9d9d9;
}

.search-results-header {
  flex-shrink: 0;
  margin-bottom: 12px;
  padding: 0 8px;
}

.search-results-list {
  .ant-list-item {
    padding: 12px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .ant-list-item:hover {
    background-color: #f5f5f5;
  }
}

.search-result-item {
  border: 1px solid #f0f0f0;
  border-radius: 6px !important;
}

.search-result-content {
  width: 100%;
}

.search-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.search-result-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-title {
  font-size: 14px;
}

.message-time {
  font-size: 12px;
}

.search-result-snippet {
  margin-left: 44px; /* 与头像对齐 */
}

.search-highlight {
  background-color: #fff3cd;
  color: #856404;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 500;
}

/* 搜索选项面板 */
.search-options {
  margin-top: 8px;
  padding: 12px;
  background-color: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.search-options .ant-checkbox-wrapper {
  margin-bottom: 8px;
}

.search-options .ant-checkbox-wrapper:last-child {
  margin-bottom: 0;
}

.search-options .ant-space {
  width: 100%;
}

/* 搜索选项暗黑模式 */
.dark .search-options {
  background-color: #2d2d2d;
  border-color: #424242;
}

.dark .search-options .ant-checkbox-wrapper {
  color: #e8e8e8;
}

.dark .search-options .ant-checkbox-wrapper:hover {
  color: #ffffff;
}

/* 搜索选项按钮样式 */
.search-input-section .ant-input-affix-wrapper .ant-input-suffix .ant-btn {
  border: none;
  box-shadow: none;
  color: #666;
  transition: color 0.3s ease;
}

.search-input-section .ant-input-affix-wrapper .ant-input-suffix .ant-btn:hover {
  color: #1890ff;
}

.search-input-section .ant-input-affix-wrapper .ant-input-suffix .ant-btn:focus {
  color: #1890ff;
}

/* 搜索选项提示 */
.search-options-tooltip {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.dark .search-options-tooltip {
  color: #999;
}
