/* search-custom.css - 完整版，专为 MacCMS 搜索页优化 */

.search-box-wrapper {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.custom-search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 9999px;
  padding: 0 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  height: 52px;
}

/* 左侧下拉触发器 */
.search-type-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 12px;
  border-right: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.search-type-trigger i {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* 下拉菜单 */
#searchTypeDropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #1e293b;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 60;
  min-width: 80px;
  max-width: 80px;
  display: none;
}

#searchTypeDropdown.show {
  display: block;
}

#searchTypeDropdown a {
  display: block;
  padding: 8px 12px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.2s ease;
  text-align: center;
}

#searchTypeDropdown a:hover {
  background: #334155;
}

/* 搜索输入框 */
.custom-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 16px;
  color: #0f172a;
  font-size: 1rem;
  line-height: 52px; /* 关键：等于容器高度，实现垂直居中 */
  height: 100%;
}

.custom-search-input::placeholder {
  color: #94a3b8;
}

/* 搜索按钮 */
.custom-search-button {
  width: 36px;
  height: 36px;
  margin-left: 8px;
  background: #f43f5e;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.custom-search-button:hover {
  background: #e11d48;
}

.custom-search-button i {
  font-size: 0.875rem;
}