/* 科目搜索共用组件：只负责搜索框下拉结果，不影响页面主体数据 */
.subject-search-wrap{
  position: relative;
  overflow: visible;
}

.subject-search-panel{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  display: none;
  background: #f5f7fb;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

.subject-search-panel.is-open{
  display: block;
}

.subject-search-panel-head{
  display: none;
}

.subject-search-panel-title,
.subject-search-panel-meta{
  display: none;
}

.subject-search-list{
  max-height: 320px;
  overflow: auto;
}

.subject-search-item{
  display: block;
  padding: 12px 18px;
  cursor: pointer;
  transition: background-color .16s ease;
}

.subject-search-item + .subject-search-item{
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.subject-search-item:hover,
.subject-search-item:focus,
.subject-search-item.is-active{
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.subject-search-item-main{
  min-width: 0;
}

.subject-search-item-title{
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.82);
  word-break: break-all;
}

.subject-search-item-sub{
  display: none;
}

.subject-search-highlight{
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-weight: inherit;
}

.subject-search-state{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 88px;
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.62);
}

.subject-search-state.is-loading{
  min-height: 72px;
}

.subject-search-spinner{
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.18);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: subject-search-spin .8s linear infinite;
  flex: 0 0 auto;
}

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

.subject-search-state.is-empty{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subject-search-empty-icon{
  width: 40px;
  height: 40px;
  margin: 0 auto 2px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.08);
  font-size: 18px;
}

.subject-search-empty-title{
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.subject-search-empty-desc{
  font-size: 12px;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.60);
}

@media (max-width: 767.98px){
  .subject-search-panel{
    top: calc(100% + 4px);
    border-radius: 0 0 12px 12px;
  }

  .subject-search-item{
    padding: 10px 12px;
  }

  .subject-search-item-title{
    font-size: 12px;
    line-height: 1.65;
  }

  .subject-search-state{
    min-height: 76px;
    padding: 14px;
  }
}
