/* =========================================
   FILTRO DE NOVEDADES (Toggle Pills)
   ========================================= */

/* 1. Atrapamos el div dinámico de Drupal usando la estructura estática del fieldset */
.novedades-filter-pills .fieldset-wrapper > div {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0;
  border: none;
}

/* 2. Eliminamos los márgenes de los divs envoltorios individuales de cada radio */
.novedades-filter-pills .js-form-item {
  margin: 0 !important;
  padding: 0 !important;
}

/* 3. Ocultamos el circulito nativo (WCAG) */
.novedades-filter-pills input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* 4. Estilizamos el Label como un Pill */
.novedades-filter-pills label.option {
  display: inline-block;
  cursor: pointer;
  padding: 0.4rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333333;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 50rem;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

/* Hover y Focus */
.novedades-filter-pills label.option:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}
.novedades-filter-pills input[type="radio"]:focus-visible + label.option {
  outline: 2px solid #205C40;
  outline-offset: 2px;
}

/* Botón Activo */
.novedades-filter-pills input[type="radio"]:checked + label.option {
  background-color: #205C40;
  color: #ffffff;
  border-color: #205C40;
}