.wai-feedback__heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0;
  min-height: 2rem;
}

.wai-feedback__get {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;

  [data-wai-feedback-state-value='idle'] & {
    display: flex;
  }
}

.wai-feedback__intermediary {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.wai-feedback__intermediary,
.wai-feedback__loading-message,
.wai-feedback__error-message,
.wai-feedback__intermediary .icon {
  display: none;
}

:is(
    [data-wai-feedback-state-value='loading'],
    [data-wai-feedback-state-value='error']
  )
  .wai-feedback__intermediary {
  display: flex;
}

[data-wai-feedback-state-value='loading'] {
  .wai-feedback__loading-message,
  .icon-spinner {
    display: block;
  }
}

[data-wai-feedback-state-value='error'] {
  .wai-feedback__error-message,
  .icon-warning {
    display: block;
  }

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

.wai-feedback__indicator {
  display: inline-flex;
  padding: 0;
  background: transparent;

  [data-wai-feedback-score-value='0'] & {
    display: none;
  }
  [data-wai-feedback-score-value='1'] & {
    color: var(--w-color-critical-200);
  }
  [data-wai-feedback-score-value='2'] & {
    color: var(--w-color-warning-100);
  }
  [data-wai-feedback-score-value='3'] & {
    color: var(--w-color-positive-100);
  }
}

.wai-feedback__clear {
  display: none;

  [data-wai-feedback-state-value='suggesting'] & {
    display: inline-flex;
  }
}

:is(.wai-feedback__overall, .wai-feedback__suggestions):not(:has(li)) {
  display: none;
}

.wai-feedback__overall-list,
.wai-feedback__suggestions-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  overflow: scroll;
}

.wai-feedback__overall-item,
.wai-feedback__suggestions-item {
  background-color: var(--w-color-surface-info-panel);
  color: var(--w-color-text-context);
  padding: 0.5rem;
  border-radius: 0.25rem;
  min-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  justify-content: space-between;

  .w-theme-dark & {
    background-color: color-mix(
      in srgb,
      var(--w-color-surface-info-panel),
      #000 50%
    );
  }

  @media (prefers-color-scheme: dark) {
    .w-theme-system & {
      background-color: color-mix(
        in srgb,
        var(--w-color-surface-info-panel),
        #000 50%
      );
    }
  }
}

.wai-feedback__suggestions-text {
  background: transparent;
  border: none;
  color: inherit;
  font-size: inherit;
  padding: 0px;
  overflow: clip;
}

.wai-feedback__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
}

.wai-feedback__overall-item-text {
  margin-bottom: 0;
}

.wai-feedback__overall-item .wai-feedback__overall-dismiss,
.wai-feedback__suggestions-item .wai-feedback__suggestions-dismiss {
  margin-inline-start: 0;
}

