/* ── ACCID Shared Filter Bar ── shared/accid-filter.css ── */

#accid-filter-bar {
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 100;
}

#accid-filter-bar input[type=text] {
  flex: 1;          /* fills the row: [ search ][Category][Tag] on one line */
  min-width: 160px;
  padding: 6px 12px;
  border: 1.5px solid #dee2e6;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
#accid-filter-bar input[type=text]:focus { border-color: #667eea; }

.afb-dropdown { position: relative; }

.afb-trigger {
  padding: 5px 14px;
  border: 1.5px solid #dee2e6;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
  font-family: inherit;
}
.afb-trigger.has-active { background: #667eea; color: #fff; border-color: #667eea; }

.afb-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10001;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 8px;
  min-width: 40vw;
  max-height: 280px;
  overflow-y: auto;
}
.afb-panel.open { display: block; }

.afb-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  margin: 2px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #ccc;
  background: #fff;
  transition: all .15s;
  font-family: inherit;
}
.afb-pill:hover { opacity: .8; }
.afb-pill.selected { color: #fff !important; }

#afb-active-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 12px;
}
#afb-active-row:empty { display: none; }

.afb-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #eef;
  border: 1.5px solid #aab;
}
.afb-active-pill button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: #999;
  padding: 0 0 0 2px;
}
.afb-active-pill button:hover { color: #333; }

#afb-count {
  font-size: 12px;
  color: #888;
  flex-basis: 100%;   /* drop to its own line so its auto-margin doesn't starve the search box */
  text-align: right;
  white-space: nowrap;
}

.afb-clear-all {
  font-size: 11px;
  color: #888;
  cursor: pointer;
  text-decoration: underline;
}
.afb-clear-all:hover { color: #333; }

/* ── Sort Bar ── */
#accid-sort-bar {
  max-width: 1100px;
  margin: 0 auto 10px;
  padding: 4px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
#accid-sort-bar button {
  font-family: inherit;
  transition: all .15s;
}
#accid-sort-bar button:hover {
  opacity: .8;
}
