.wai-chooser-panel__buttons {
  display: flex;
  align-items: flex-start;
}

.wai-chooser-panel__loading,
.wai-chooser-panel__error {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.wai-chooser-panel__loading,
.wai-chooser-panel__error,
.wai-chooser-panel__no-more-label,
.wai-chooser-panel__suggest-more-label,
.button.wai-chooser-panel__button-clear {
  display: none;
}

.wai-chooser-panel__error .icon-warning {
  color: var(--w-color-text-error);
}

/* Initial State
   Show "Suggest" label, hide "clear" button
*/
[data-wai-chooser-panel-state-value]:not(
    [data-wai-chooser-panel-state-value='initial']
  )
  .wai-chooser-panel__suggest-label {
  display: none;
}

[data-wai-chooser-panel-state-value]:not(
    [data-wai-chooser-panel-state-value='initial']
  )
  .wai-chooser-panel__suggest-more-label {
  display: flex;
}

[data-wai-chooser-panel-state-value]:not(
    [data-wai-chooser-panel-state-value='initial']
  )
  .button.wai-chooser-panel__button-clear {
  display: flex;
}

/* Loading State
   Show loading indicator, hide suggestions and buttons
*/
[data-wai-chooser-panel-state-value='loading'] .wai-chooser-panel__loading {
  display: flex;
}

[data-wai-chooser-panel-state-value='loading'] .wai-chooser-panel__forms {
  display: none;
}

[data-wai-chooser-panel-state-value='loading'] .wai-chooser-panel__buttons {
  display: none;
}

/* Error state
   Show error
*/
[data-wai-chooser-panel-state-value='error'] .wai-chooser-panel__error {
  display: flex;
}

/* No more suggestions state
   Show no suggestions label
*/
[data-wai-chooser-panel-state-value][data-wai-chooser-panel-state-value='no_more']
  .wai-chooser-panel__suggest-more-label {
  display: none;
}

[data-wai-chooser-panel-state-value='no_more']
  .wai-chooser-panel__no-more-label {
  display: flex;
}

