.biblio-audience-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #ced4da;
  background: #fff;
  color: #495057;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.biblio-audience-toggle:hover,
.biblio-audience-toggle:focus {
  border-color: #0d6efd;
  color: #0d6efd;
  outline: none;
}

.biblio-audience-toggle.has-active {
  background-color: #e7f1ff;
  border-color: #0d6efd;
  color: #0d6efd;
  font-weight: 600;
}

.biblio-audience-toggle[aria-expanded="true"] .biblio-audience-toggle-chevron {
  transform: rotate(180deg);
}

.biblio-audience-toggle-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 0.75rem;
}

.biblio-audience-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.35rem;
  background: #0d6efd;
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.biblio-audience-badge[hidden] {
  display: none;
}

.biblio-audience-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 100;
  min-width: 240px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
}

.biblio-audience-panel[hidden] {
  display: none;
}

.biblio-audience-panel-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #495057;
  line-height: 1.3;
}

.biblio-audience-panel .form-check {
  margin-bottom: 0.35rem;
}

.biblio-audience-panel .form-check:last-child {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .biblio-audience-panel {
    left: auto;
    right: 0;
  }
}
