/* v5.0.6 — selector/filter reliability and project-evidence readability. */

/* The reusable selector controller uses the native hidden attribute. Legacy
 * display:grid!important rules must never defeat a year/search filter. */
.had-record-selector-panel [data-had-selector-row][hidden],
[data-had-career-index-kind][hidden],
.had-record-selector-panel [data-had-selector-empty][hidden]{
  display:none!important;
}

/* Sidebars are narrower than the collection Matching records panel. Preserve
 * the same visual language while stacking search and year controls so buttons
 * never collide with record text. */
.had-record-selector-filter-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  gap:7px!important;
  align-items:stretch!important;
  padding:8px 0 9px!important;
}
.had-record-selector-filter-row .had-search-box{
  width:100%!important;
  max-width:none!important;
}
.had-record-selector-filter-row .had-year-filter{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  gap:5px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:0 0 3px!important;
  scrollbar-width:thin;
  scrollbar-color:#1684a3 transparent;
}
.had-record-selector-filter-row .had-year-filter button{
  flex:0 0 auto!important;
  min-width:42px!important;
  height:31px!important;
}

/* Ensure all three selector rows (heading / controls / list) receive their own
 * grid track, especially the credential panel where older CSS expected only two. */
.had-credentials-v3 .had-credential-list.had-record-selector-panel,
.had-publications-final .had-latest-list.had-record-selector-panel,
.had-teaching-records-panel.had-record-selector-panel,
.had-project-record-index.had-record-selector-panel,
.had-career-record-index.had-record-selector-panel,
.had-code-record-index.had-record-selector-panel,
.had-blog-console.had-record-selector-panel{
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr)!important;
  min-height:0!important;
  overflow:hidden!important;
}
.had-credentials-v3 .had-credential-scroll,
.had-publications-final .had-scroll-list,
.had-teaching-records-panel .had-teaching-stream,
.had-project-record-index .had-record-index-scroll,
.had-career-record-index .had-record-index-scroll,
.had-code-record-index .had-record-index-scroll,
.had-blog-console .had-blog-list{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

/* Credential index: remove the previous visual collision between toolbar and
 * the first row, while retaining the same matching-record typography. */
.had-credentials-v3 .had-credential-list{
  padding:10px!important;
}
.had-credentials-v3 .had-credential-list [data-had-selector-row]{
  min-height:76px!important;
  padding:9px 6px!important;
}
.had-credentials-v3 .had-credential-list [data-had-selector-row] b{
  font-size:12.5px!important;
  line-height:1.25!important;
}
.had-credentials-v3 .had-credential-list [data-had-selector-row] small{
  font-size:9.5px!important;
  line-height:1.3!important;
}

/* Career/education: only the panel matching the active Work/Education tab is
 * allowed to occupy the right column. */
.had-career-index-lists>[data-had-career-index-kind][hidden]{display:none!important}
.had-career-index-lists>[data-had-career-index-kind]:not([hidden]){
  display:grid!important;
  height:100%!important;
  min-height:0!important;
}

/* Project selector labels now carry the actual project start year. */
.had-project-record-index [data-had-selector-row] label{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Longer, study-specific evidence descriptions in the project dashboard. */
.had-project-source-panel>p{
  color:#8eabb7!important;
  font-size:9.5px!important;
  line-height:1.55!important;
  margin:8px 0 10px!important;
}
.had-project-source-panel .had-source-flow{
  align-items:stretch!important;
  flex-wrap:wrap!important;
}
.had-project-source-panel .had-source-flow>span{
  flex:1 1 145px!important;
  min-width:145px!important;
}
.had-project-source-panel .had-source-flow b{
  font-size:8px!important;
  line-height:1.35!important;
}
.had-project-method-chips>span{
  font-size:11px!important;
  line-height:1.3!important;
}

@media(max-width:900px){
  .had-record-selector-filter-row .had-year-filter{padding-bottom:6px!important}
}
