.lgaf-search,
.lgaf-form {
  display: block;
}

.lgaf-form {
  --lgaf-gap: 1rem;
  position: relative;
}

.lgaf-form__groups {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--lgaf-gap);
}

.lgaf-filter {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.lgaf-filter__label {
  display: block;
  width: 100%;
  margin: 0 0 .5rem;
  padding: 0;
  font-weight: 600;
}

.lgaf-control {
  max-width: 100%;
}

.lgaf-control--select {
  min-width: 12rem;
}

.lgaf-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.lgaf-choice {
  position: relative;
  display: inline-flex;
}

.lgaf-choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.lgaf-choice__label,
.lgaf-action,
.lgaf-control {
  border: 1px solid currentColor;
  background: transparent;
  padding: .65rem 1rem;
  cursor: pointer;
}

.lgaf-choice__input:focus-visible + .lgaf-choice__label,
.lgaf-action:focus-visible,
.lgaf-control:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.lgaf-choice__input:checked + .lgaf-choice__label {
  color: #fff;
  background: #222;
}

.lgaf-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
}

.lgaf-status {
  min-height: 1.25em;
}

.lgaf-target-is-loading {
  opacity: .45;
  pointer-events: none;
  transition: opacity .2s ease;
}

.lgaf-form.is-loading::after {
  content: '';
  position: absolute;
  top: .25rem;
  right: .25rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lgaf-spin .7s linear infinite;
}

.lgaf-editor-notice {
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-left: 4px solid #dba617;
  background: #fff8e5;
  color: #3c434a;
}

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

@media (prefers-reduced-motion: reduce) {
  .lgaf-target-is-loading {
    transition: none;
  }

  .lgaf-form.is-loading::after {
    animation-duration: 1.5s;
  }
}
