.graphiql-history-header {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-medium);
}

.graphiql-history-items {
  margin: var(--px-16) 0 0;
  list-style: none;
  padding: 0;
}

.graphiql-history-item {
  border-radius: var(--border-radius-4);
  color: hsla(var(--color-neutral), var(--alpha-secondary));
  display: flex;
  font-size: var(--font-size-inline-code);
  font-family: var(--font-family-mono);
  height: 34px;

  &:hover {
    color: hsla(var(--color-neutral), 1);
    background-color: hsla(var(--color-neutral), var(--alpha-background-light));
  }

  &:not(:first-child) {
    margin-top: var(--px-4);
  }

  &.editable {
    background-color: hsla(
      var(--color-primary),
      var(--alpha-background-medium)
    );

    & > input {
      background: transparent;
      border: none;
      flex: 1;
      margin: 0;
      outline: none;
      padding: 0 var(--px-10);
      width: 100%;

      &::placeholder {
        color: hsla(var(--color-neutral), var(--alpha-secondary));
      }
    }

    & > button {
      color: hsl(var(--color-primary));
      padding: 0 var(--px-10);

      &:active {
        background-color: hsla(
          var(--color-primary),
          var(--alpha-background-heavy)
        );
      }

      &:focus {
        outline: hsl(var(--color-primary)) auto 1px;
      }

      & > svg {
        display: block;
      }
    }
  }
}

button.graphiql-history-item-label {
  flex: 1;
  padding: var(--px-8) var(--px-10);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.graphiql-history-item-action {
  align-items: center;
  color: hsla(var(--color-neutral), var(--alpha-secondary));
  display: flex;
  padding: var(--px-8) var(--px-6);

  &:hover {
    color: hsla(var(--color-neutral), 1);
  }

  & > svg {
    height: 14px;
    width: 14px;
  }
}

.graphiql-history-item-spacer {
  height: var(--px-16);
}
